mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2025-12-14 06:41:55 +00:00
Ladder contacts
This commit is contained in:
23
src/client/Character/Client/Actions.lua
Normal file
23
src/client/Character/Client/Actions.lua
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
local Actions = {
|
||||||
|
ActionCurrent = false,
|
||||||
|
Walk = 10,
|
||||||
|
Sneaking = 10/2 --10 is default
|
||||||
|
}
|
||||||
|
Actions.__index = Actions
|
||||||
|
|
||||||
|
function Actions.constructor(HumanoidSettingsInherent, Humanoid: Humanoid)
|
||||||
|
return setmetatable({
|
||||||
|
Humanoid = Humanoid,
|
||||||
|
HumanoidSettingsInherent = HumanoidSettingsInherent
|
||||||
|
}, Actions)
|
||||||
|
end
|
||||||
|
|
||||||
|
function Actions:Enable()
|
||||||
|
self.HumanoidSettingsInherent:SetWalkSpeed(Actions.Sneaking)
|
||||||
|
end
|
||||||
|
|
||||||
|
function Actions:Disable()
|
||||||
|
self.HumanoidSettingsInherent:SetWalkSpeed(Actions.Walk)
|
||||||
|
end
|
||||||
|
|
||||||
|
return Actions
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
local Sneak = {
|
|
||||||
IsSneaking = false,
|
|
||||||
Walk = 10,
|
|
||||||
Sneaking = 10/2 --10 is default
|
|
||||||
}
|
|
||||||
Sneak.__index = Sneak
|
|
||||||
|
|
||||||
function Sneak.constructor(HumanoidSettingsInherent, Humanoid: Humanoid)
|
|
||||||
return setmetatable({
|
|
||||||
Humanoid = Humanoid,
|
|
||||||
HumanoidSettingsInherent = HumanoidSettingsInherent
|
|
||||||
}, Sneak)
|
|
||||||
end
|
|
||||||
|
|
||||||
function Sneak:Enable()
|
|
||||||
self.HumanoidSettingsInherent:SetWalkSpeed(Sneak.Sneaking)
|
|
||||||
end
|
|
||||||
|
|
||||||
function Sneak:Disable()
|
|
||||||
self.HumanoidSettingsInherent:SetWalkSpeed(Sneak.Walk)
|
|
||||||
end
|
|
||||||
|
|
||||||
return Sneak
|
|
||||||
@@ -58,12 +58,19 @@ local function ClientCharacterBinds()
|
|||||||
CrouchConstructor:Stand(5)
|
CrouchConstructor:Stand(5)
|
||||||
end)
|
end)
|
||||||
--Walk
|
--Walk
|
||||||
ClientBindMap:AddInputBegan({Enum.KeyCode.LeftShift, Enum.KeyCode.RightShift}, function()
|
ClientBindMap:AddInputBegan({Enum.KeyCode.LeftAlt, Enum.KeyCode.RightAlt}, function()
|
||||||
HumanoidSettings:SetWalkSpeed(Walking)
|
HumanoidSettings:SetWalkSpeed(Walking)
|
||||||
end)
|
end)
|
||||||
ClientBindMap:AddInputEnded({Enum.KeyCode.LeftShift, Enum.KeyCode.RightShift}, function()
|
ClientBindMap:AddInputEnded({Enum.KeyCode.LeftAlt, Enum.KeyCode.RightAlt}, function()
|
||||||
HumanoidSettings:SetWalkSpeed(10)
|
HumanoidSettings:SetWalkSpeed(10)
|
||||||
end)
|
end)
|
||||||
|
--Sprint
|
||||||
|
ClientBindMap:AddInputBegan({Enum.KeyCode.LeftShift, Enum.KeyCode.RightShift}, function()
|
||||||
|
|
||||||
|
end)
|
||||||
|
ClientBindMap:AddInputEnded({Enum.KeyCode.LeftShift, Enum.KeyCode.RightShift}, function()
|
||||||
|
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function Crosshair3DVelocity_Effect(): RBXScriptSignal
|
local function Crosshair3DVelocity_Effect(): RBXScriptSignal
|
||||||
|
|||||||
@@ -2,8 +2,9 @@
|
|||||||
|
|
||||||
--Who said UI on here cant look like a web design lole,
|
--Who said UI on here cant look like a web design lole,
|
||||||
|
|
||||||
local RS = game:GetService("RunService")
|
local RS = game:GetService("RunService")
|
||||||
local Storage = game:GetService("ReplicatedStorage")
|
local Storage = game:GetService("ReplicatedStorage")
|
||||||
|
local TS = game:GetService("TestService")
|
||||||
|
|
||||||
local LoadingFun = true
|
local LoadingFun = true
|
||||||
|
|
||||||
@@ -113,7 +114,8 @@ return function(IntroGui: ScreenGui, load_elapse_start: number)
|
|||||||
if LoadingFun then
|
if LoadingFun then
|
||||||
task.wait(math.max(0, 3-load_elapse)) --Only if you take longer than or exactly 3 seconds to load
|
task.wait(math.max(0, 3-load_elapse)) --Only if you take longer than or exactly 3 seconds to load
|
||||||
end
|
end
|
||||||
print(load_elapse)
|
TS:Message("Load elapse: "..tostring(load_elapse), game)
|
||||||
|
|
||||||
GUI_LoadFinish(Stepped, Gui)
|
GUI_LoadFinish(Stepped, Gui)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
@@ -34,12 +34,19 @@ local function HideRaycastContainers(Folder: Folder, enabled: boolean)
|
|||||||
Start.Transparency = enabled and 1 or .9
|
Start.Transparency = enabled and 1 or .9
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function HideLadderContact(Part: BasePart, enabled: boolean)
|
||||||
|
Part.Transparency = enabled and 1 or .9
|
||||||
|
Part.CanCollide = true
|
||||||
|
Part.CastShadow = false
|
||||||
|
end
|
||||||
|
|
||||||
local EditorEntities = {
|
local EditorEntities = {
|
||||||
["LightSource"] = HidePart,
|
["LightSource"] = HidePart,
|
||||||
["PulleyRopeContact"] = HidePart,
|
["PulleyRopeContact"] = HidePart,
|
||||||
["BarrierCollision"] = HideBarrierCollision,
|
["BarrierCollision"] = HideBarrierCollision,
|
||||||
["StairSource"] = HideBarrierCollision,
|
["StairSource"] = HideBarrierCollision,
|
||||||
["RaycastContainer"] = HideRaycastContainers
|
["RaycastContainer"] = HideRaycastContainers,
|
||||||
|
["LadderContact"] = HideLadderContact
|
||||||
}
|
}
|
||||||
|
|
||||||
function StudioEntities.indexAll(enabled: boolean): Entities
|
function StudioEntities.indexAll(enabled: boolean): Entities
|
||||||
|
|||||||
Reference in New Issue
Block a user