mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2025-12-15 22:11:54 +00:00
Floors module
This commit is contained in:
@@ -30,12 +30,14 @@ end
|
||||
function Spine:Enable()
|
||||
Spine.Running = true
|
||||
|
||||
while Spine.Running do
|
||||
local IsFirstPerson = Player.CameraMode == Enum.CameraMode.LockFirstPerson
|
||||
self.Remote:FireServer(self.CurrentCamera.CFrame, IsFirstPerson)
|
||||
task.spawn(function()
|
||||
while Spine.Running do
|
||||
local IsFirstPerson = Player.CameraMode == Enum.CameraMode.LockFirstPerson
|
||||
self.Remote:FireServer(self.CurrentCamera.CFrame, IsFirstPerson)
|
||||
|
||||
Delta:time()
|
||||
end
|
||||
Delta:time()
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
function Spine:Disable()
|
||||
|
||||
@@ -42,22 +42,32 @@ local CameraConsturctor = CameraModule.constructor(CurrentCamera, HumanoidRootPa
|
||||
local HumanoidSettings = HumanoidModule.constructor(Humanoid)
|
||||
local SpineMovement = SpineModule.constructor(CurrentCamera)
|
||||
|
||||
local function CrouchFeature()
|
||||
local Walking = 10/2 --10 is default
|
||||
|
||||
local function ClientCharacterBinds()
|
||||
local CrouchConstructor = CrouchModule.constructor(Humanoid)
|
||||
local CourchBindMap = BindModule.constructor()
|
||||
local BindMap = BindModule.constructor()
|
||||
|
||||
CourchBindMap:AddInputBegan({Enum.KeyCode.RightControl, Enum.KeyCode.LeftControl}, function()
|
||||
--Crouch
|
||||
BindMap:AddInputBegan({Enum.KeyCode.RightControl, Enum.KeyCode.LeftControl}, function()
|
||||
CrouchConstructor:Crouch(10)
|
||||
end)
|
||||
CourchBindMap:AddInputEnded({Enum.KeyCode.RightControl, Enum.KeyCode.LeftControl}, function()
|
||||
BindMap:AddInputEnded({Enum.KeyCode.RightControl, Enum.KeyCode.LeftControl}, function()
|
||||
CrouchConstructor:Stand(5)
|
||||
end)
|
||||
--Walk
|
||||
BindMap:AddInputBegan({Enum.KeyCode.LeftShift, Enum.KeyCode.RightShift}, function()
|
||||
HumanoidSettings:SetWalkSpeed(Walking)
|
||||
end)
|
||||
BindMap:AddInputEnded({Enum.KeyCode.LeftShift, Enum.KeyCode.RightShift}, function()
|
||||
HumanoidSettings:SetWalkSpeed(10)
|
||||
end)
|
||||
end
|
||||
|
||||
HumanoidSettings:SetWalkSpeed()
|
||||
HumanoidSettings:SetJumpHeight()
|
||||
HRPSettings:DisableRobloxSounds()
|
||||
-- CameraConsturctor:EnableBobbing()
|
||||
CameraConsturctor:EnableBobbing()
|
||||
SpineMovement:Enable()
|
||||
|
||||
CrouchFeature()
|
||||
ClientCharacterBinds()
|
||||
@@ -44,7 +44,7 @@ local function CameraBinds()
|
||||
end
|
||||
|
||||
CoreGuis:Off()
|
||||
-- Camera:FirstPerson()
|
||||
Camera:FirstPerson()
|
||||
Mouse:DisablePointer()
|
||||
Crosshair:Enable()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user