Floors module

This commit is contained in:
2024-02-14 21:34:45 -05:00
parent c454a5cc4e
commit 0dfaaa4946
8 changed files with 175 additions and 64 deletions

View File

@@ -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()