input
stringlengths 6
11.4M
| output
stringlengths 6
4.94M
|
---|---|
SniperEnabled=false FieldOfView=12.5 MouseSensitive=.05 SpreadRedution=1 | -- ====================
-- SNIPER
-- Enable user to use scope
-- ====================
SniperEnabled = false
FieldOfView = 12.5
MouseSensitive = 0.05 --In percent
SpreadRedution = 1 --In percent.
|
Tune.LoadDelay=.1 Tune.AutoStart=false Tune.AutoFlip=true | --[[Misc]]
Tune.LoadDelay = 0.1 -- Delay before initializing chassis (in seconds)
Tune.AutoStart = false -- Set to false if using manual ignition plugin
Tune.AutoFlip = true -- Set to false if using manual flip plugin
|
Tune.SusEnabled=true Tune.FSusDamping=500 Tune.FSusStiffness=9000 Tune.FSusLength=2 Tune.FSusMaxExt=.3 Tune.FSusMaxComp=.1 Tune.FSusAngle=80 Tune.FWsBoneLen=5 Tune.FWsBoneAngle=0 Tune.FAnchorOffset={-0.4,-0.5;0}Tune.RSusDamping=500 Tune.RSusStiffness=9000 Tune.RSusLength=2 Tune.RSusMaxExt=.3 Tune.RSusMaxComp=.1 Tune.RSusAngle=80 Tune.RWsBoneLen=5 Tune.RWsBoneAngle=0 Tune.RAnchorOffset={-0.4,-0.5,0}Tune.SusVisible=true Tune.WsBVisible=false Tune.SusRadius=.2 Tune.SusThickness=.1 Tune.SusColor="\082\101\097\108\108\121 \098\108\097\099\107"Tune.SusCoilCount=6 Tune.WsColor="\066\108\097\099\107"Tune.WsThickness=.1 | --[[Susupension]]
Tune.SusEnabled = true -- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled
--Front Suspension
Tune.FSusDamping = 500 -- Spring Dampening
Tune.FSusStiffness = 9000 -- Spring Force
Tune.FSusLength = 2 -- Suspension length (in studs)
Tune.FSusMaxExt = 0.3 -- Max Extension Travel (in studs)
Tune.FSusMaxComp = 0.1 -- Max Compression Travel (in studs)
Tune.FSusAngle = 80 -- Suspension Angle (degrees from horizontal)
Tune.FWsBoneLen = 5 -- Wishbone Length
Tune.FWsBoneAngle = 0 -- Wishbone angle (degrees from horizontal)
Tune.FAnchorOffset = { -- Suspension anchor point offset (relative to center of wheel)
--[[Lateral]]
-0.4, -- positive = outward
--[[Vertical]]
-0.5, -- positive = upward
--[[Forward]]
0,
} -- positive = forward
--Rear Suspension
Tune.RSusDamping = 500 -- Spring Dampening
Tune.RSusStiffness = 9000 -- Spring Force
Tune.RSusLength = 2 -- Suspension length (in studs)
Tune.RSusMaxExt = 0.3 -- Max Extension Travel (in studs)
Tune.RSusMaxComp = 0.1 -- Max Compression Travel (in studs)
Tune.RSusAngle = 80 -- Suspension Angle (degrees from horizontal)
Tune.RWsBoneLen = 5 -- Wishbone Length
Tune.RWsBoneAngle = 0 -- Wishbone angle (degrees from horizontal)
Tune.RAnchorOffset = { -- Suspension anchor point offset (relative to center of wheel)
--[[Lateral]]
-0.4, -- positive = outward
--[[Vertical]]
-0.5, -- positive = upward
--[[Forward]]
0,
} -- positive = forward
--Aesthetics
Tune.SusVisible = true -- Spring Visible
Tune.WsBVisible = false -- Wishbone Visible
Tune.SusRadius = 0.2 -- Suspension Coil Radius
Tune.SusThickness = 0.1 -- Suspension Coil Thickness
Tune.SusColor = "Really black" -- Suspension Color [BrickColor]
Tune.SusCoilCount = 6 -- Suspension Coil Count
Tune.WsColor = "Black" -- Wishbone Color [BrickColor]
Tune.WsThickness = 0.1 -- Wishbone Rod Thickness
|
function Promise.prototype.finallyReturn(a,...)local I,X=pack(...)return a:_finally(debug.traceback(nil,2),function()return unpack(X,1,I)end)end | --[=[
Attaches a `finally` handler to this Promise that discards the resolved value and returns the given value from it.
```lua
promise:finallyReturn("some", "values")
```
This is sugar for
```lua
promise:finally(function()
return "some", "values"
end)
```
@param ... any -- Values to return from the function
@return Promise
]=]
function Promise.prototype:finallyReturn(...)
local length, values = pack(...)
return self:_finally(debug.traceback(nil, 2), function()
return unpack(values, 1, length)
end)
end
|
while wait()do local a=GetTorso(hroot.Position)if a~=nil and human.Health>0 then vars.Wandering.Value=false vars.Chasing.Value=true local function I(a)local I=3 if I>#a then I=3 end if a[I]==nil and I<#a then repeat I=I+1 wait()until a[I]~=nil return Vector3.new(1,0,0)+a[I]else I=3 return a[I]end end path=pfs:FindPathAsync(hroot.Position,a.Position)waypoint=path:GetWaypoints()local X local u=Vector3.FromNormalId(Enum.NormalId.Front)local M=hroot.CFrame*CFrame.new(u)u=M.p.unit local U=Ray.new(hroot.Position,u)local w,v=game.Workspace:FindPartOnRay(U,hroot)if path and waypoint or I(waypoint)then if I(waypoint)~=nil and(I(waypoint)).Action==Enum.PathWaypointAction.Walk then human:MoveTo((I(waypoint)).Position)human.Jump=false end if I(waypoint)~=nil and(I(waypoint)).Action==Enum.PathWaypointAction.Jump then X=human.Changed:connect(function()human.Jump=true end)human:MoveTo(waypoint[4].Position)else human.Jump=false end hroot.Touched:connect(function(I)local u=GetPlayersBodyParts(a)if I:IsA("\080\097\114\116")and(not I.Name==u and(w and(w.Name~=u and(w:IsA("\080\097\114\116")and U:Distance(w.Position)<5))))then X=human.Changed:connect(function()human.Jump=true end)else human.Jump=false end end)if X then X:Disconnect()end else for a=3,#waypoint,1 do human:MoveTo(waypoint[a].Position)end end path=nil waypoint=nil elseif a==nil then vars.Wandering.Value=false vars.Chasing.Value=false CchaseName=nil path=nil waypoint=nil human.MoveToFinished:Wait()end end | -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
while wait() do
local nrstt = GetTorso(hroot.Position)
if nrstt ~= nil and human.Health > 0 then -- if player detected
vars.Wandering.Value = false
vars.Chasing.Value = true
local function checkw(t)
local ci = 3
if ci > #t then
ci = 3
end
if t[ci] == nil and ci < #t then
repeat
ci = ci + 1
wait()
until t[ci] ~= nil
return Vector3.new(1, 0, 0) + t[ci]
else
ci = 3
return t[ci]
end
end
path = pfs:FindPathAsync(hroot.Position, nrstt.Position)
waypoint = path:GetWaypoints()
local connection
local direct = Vector3.FromNormalId(Enum.NormalId.Front)
local ncf = hroot.CFrame * CFrame.new(direct)
direct = ncf.p.unit
local rootr = Ray.new(hroot.Position, direct)
local phit, ppos = game.Workspace:FindPartOnRay(rootr, hroot)
if path and waypoint or checkw(waypoint) then
if checkw(waypoint) ~= nil and checkw(waypoint).Action == Enum.PathWaypointAction.Walk then
human:MoveTo(checkw(waypoint).Position)
human.Jump = false
end
if checkw(waypoint) ~= nil and checkw(waypoint).Action == Enum.PathWaypointAction.Jump then
connection = human.Changed:connect(function()
human.Jump = true
end)
human:MoveTo(waypoint[4].Position)
else
human.Jump = false
end
hroot.Touched:connect(function(p)
local bodypartnames = GetPlayersBodyParts(nrstt)
if
p:IsA("Part")
and not p.Name == bodypartnames
and phit
and phit.Name ~= bodypartnames
and phit:IsA("Part")
and rootr:Distance(phit.Position) < 5
then
connection = human.Changed:connect(function()
human.Jump = true
end)
else
human.Jump = false
end
end)
if connection then
connection:Disconnect()
end
else
for i = 3, #waypoint do
human:MoveTo(waypoint[i].Position)
end
end
path = nil
waypoint = nil
elseif nrstt == nil then -- if player not detected
vars.Wandering.Value = false
vars.Chasing.Value = false
CchaseName = nil
path = nil
waypoint = nil
human.MoveToFinished:Wait()
end
end
|
L_108_.OnClientEvent:connect(function(a,I,X,u,M,U,w)if a and not L_15_ then MakeFakeArms()L_42_=L_2_.PlayerGui.MainGui L_26_=L_42_:WaitForChild("\079\116\104\101\114\115")L_27_=L_26_:WaitForChild("\075\105\108\108")L_28_=(L_42_:WaitForChild("\071\097\109\101\071\117\105")):WaitForChild("\065\109\109\111\070\114\097\109\101")L_29_=L_28_:WaitForChild("\065\109\109\111")L_30_=L_28_:WaitForChild("\065\109\109\111\066\097\099\107\103\114\111\117\110\100")L_31_=L_28_:WaitForChild("\077\097\103\067\111\117\110\116")L_32_=L_28_:WaitForChild("\077\097\103\067\111\117\110\116\066\097\099\107\103\114\111\117\110\100")L_33_=L_28_:WaitForChild("\068\105\115\116\068\105\115\112")L_34_=L_28_:WaitForChild("\084\105\116\108\101")L_35_=L_28_:WaitForChild("\077\111\100\101\049")L_36_=L_28_:WaitForChild("\077\111\100\101\050")L_37_=L_28_:WaitForChild("\077\111\100\101\051")L_38_=L_28_:WaitForChild("\077\111\100\101\052")L_39_=L_28_:WaitForChild("\077\111\100\101\053")L_40_=L_28_:WaitForChild("\083\116\097\110\099\101\115")L_41_=L_42_:WaitForChild("\083\104\097\100\105\110\103")L_41_.Visible=false L_34_.Text=L_1_.Name UpdateAmmo()L_43_=I L_44_=X L_45_=u L_46_=M L_47_=U L_48_=w L_49_=L_62_.Bolt L_87_=L_48_.C1 L_88_=L_48_.C0 if L_1_:FindFirstChild("\065\105\109\080\097\114\116\050")then L_57_=L_1_:WaitForChild("\065\105\109\080\097\114\116\050")end if L_1_:FindFirstChild("\070\105\114\101\080\097\114\116\050")then L_60_=L_1_.FirePart2 end if L_24_.FirstPersonOnly then L_2_.CameraMode=Enum.CameraMode.LockFirstPerson end L_5_.FieldOfView=70 L_15_=true elseif L_15_ then if L_3_ and(L_3_.Humanoid and(L_3_.Humanoid.Health>0 and L_9_))then Stand()Unlean()end L_93_=0 L_80_=false L_81_=false L_82_=false L_64_=false L_67_=false L_66_=false Shooting=false L_97_=70 RemoveArmModel()L_42_:Destroy()for a,I in pairs(IgnoreList)do if I~=L_3_ and(I~=L_5_ and I~=L_101_)then table.remove(IgnoreList,a)end end if L_3_:FindFirstChild("\082\105\103\104\116 \065\114\109")and L_3_:FindFirstChild("\076\101\102\116 \065\114\109")then L_3_["\082\105\103\104\116 \065\114\109"].LocalTransparencyModifier=0 L_3_["\076\101\102\116 \065\114\109"].LocalTransparencyModifier=0 end L_78_=false L_69_=true L_2_.CameraMode=Enum.CameraMode.Classic L_107_.MouseIconEnabled=true L_5_.FieldOfView=70 L_15_=false L_107_.MouseDeltaSensitivity=L_52_ L_4_.Icon="\104\116\116\112\058\047\047\119\119\119\046\114\111\098\108\111\120\046\099\111\109\047\097\115\115\101\116\063\105\100\061\048"L_15_=false L_4_.TargetFilter=nil end end) | --// Connections
L_108_.OnClientEvent:connect(
function(L_191_arg1, L_192_arg2, L_193_arg3, L_194_arg4, L_195_arg5, L_196_arg6, L_197_arg7)
if L_191_arg1 and not L_15_ then
MakeFakeArms()
L_42_ = L_2_.PlayerGui.MainGui
L_26_ = L_42_:WaitForChild("Others")
L_27_ = L_26_:WaitForChild("Kill")
L_28_ = L_42_:WaitForChild("GameGui"):WaitForChild("AmmoFrame")
L_29_ = L_28_:WaitForChild("Ammo")
L_30_ = L_28_:WaitForChild("AmmoBackground")
L_31_ = L_28_:WaitForChild("MagCount")
L_32_ = L_28_:WaitForChild("MagCountBackground")
L_33_ = L_28_:WaitForChild("DistDisp")
L_34_ = L_28_:WaitForChild("Title")
L_35_ = L_28_:WaitForChild("Mode1")
L_36_ = L_28_:WaitForChild("Mode2")
L_37_ = L_28_:WaitForChild("Mode3")
L_38_ = L_28_:WaitForChild("Mode4")
L_39_ = L_28_:WaitForChild("Mode5")
L_40_ = L_28_:WaitForChild("Stances")
L_41_ = L_42_:WaitForChild("Shading")
L_41_.Visible = false
L_34_.Text = L_1_.Name
UpdateAmmo()
L_43_ = L_192_arg2
L_44_ = L_193_arg3
L_45_ = L_194_arg4
L_46_ = L_195_arg5
L_47_ = L_196_arg6
L_48_ = L_197_arg7
L_49_ = L_62_.Bolt
L_87_ = L_48_.C1
L_88_ = L_48_.C0
if L_1_:FindFirstChild("AimPart2") then
L_57_ = L_1_:WaitForChild("AimPart2")
end
if L_1_:FindFirstChild("FirePart2") then
L_60_ = L_1_.FirePart2
end
if L_24_.FirstPersonOnly then
L_2_.CameraMode = Enum.CameraMode.LockFirstPerson
end
--uis.MouseIconEnabled = false
L_5_.FieldOfView = 70
L_15_ = true
elseif L_15_ then
if L_3_ and L_3_.Humanoid and L_3_.Humanoid.Health > 0 and L_9_ then
Stand()
Unlean()
end
L_93_ = 0
L_80_ = false
L_81_ = false
L_82_ = false
L_64_ = false
L_67_ = false
L_66_ = false
Shooting = false
L_97_ = 70
RemoveArmModel()
L_42_:Destroy()
for L_198_forvar1, L_199_forvar2 in pairs(IgnoreList) do
if L_199_forvar2 ~= L_3_ and L_199_forvar2 ~= L_5_ and L_199_forvar2 ~= L_101_ then
table.remove(IgnoreList, L_198_forvar1)
end
end
if L_3_:FindFirstChild("Right Arm") and L_3_:FindFirstChild("Left Arm") then
L_3_["Right Arm"].LocalTransparencyModifier = 0
L_3_["Left Arm"].LocalTransparencyModifier = 0
end
L_78_ = false
L_69_ = true
L_2_.CameraMode = Enum.CameraMode.Classic
L_107_.MouseIconEnabled = true
L_5_.FieldOfView = 70
L_15_ = false
L_107_.MouseDeltaSensitivity = L_52_
L_4_.Icon = "http://www.roblox.com/asset?id=0"
L_15_ = false
L_4_.TargetFilter = nil
end
end
)
|
VipDoor.Touched:connect(OnTouched)while true do RemoveOldTouches()wait(.033333333333333)end | --------------------
--| Script Logic |--
--------------------
VipDoor.Touched:connect(OnTouched)
while true do
RemoveOldTouches()
wait(1 / 30)
end
|
local a=_Tune.Controls local I=Instance.new("\070\111\108\100\101\114",script.Parent)I.Name="\067\111\110\116\114\111\108\115"for X,u in pairs(a)do local M=Instance.new("\083\116\114\105\110\103\086\097\108\117\101",I)M.Name=X M.Value=u.Name M.Changed:connect(function()if X=="\077\111\117\115\101\084\104\114\111\116\116\108\101"or X=="\077\111\117\115\101\066\114\097\107\101"then if M.Value=="\077\111\117\115\101\066\117\116\116\111\110\049"or M.Value=="\077\111\117\115\101\066\117\116\116\111\110\050"then a[X]=Enum.UserInputType[M.Value]else a[X]=Enum.KeyCode[M.Value]end else a[X]=Enum.KeyCode[M.Value]end end)end local X=_Tune.Peripherals for a,u in pairs(X)do local M=Instance.new("\073\110\116\086\097\108\117\101",I)M.Name=a M.Value=u M.Changed:connect(function()M.Value=math.min(100,math.max(0,M.Value))X[a]=M.Value end)end function DealWithInput(I,X)if UserInputService:GetFocusedTextBox()==nil and not _InControls then if _IsOn and((I.KeyCode==a.ContlrShiftDown or _MSteer and I.KeyCode==a.MouseShiftDown or not _MSteer and I.KeyCode==a.ShiftDown)and((_TMode=="\065\117\116\111"or _TMode=="\083\101\109\105"or _TMode=="\077\097\110\117\097\108"and not _ClutchOn)and I.UserInputState==Enum.UserInputState.Begin))then if _CGear==0 then _ClutchOn=true end _CGear=math.max(_CGear-1,-1)elseif _IsOn and((I.KeyCode==a.ContlrShiftUp or _MSteer and I.KeyCode==a.MouseShiftUp or not _MSteer and I.KeyCode==a.ShiftUp)and((_TMode=="\065\117\116\111"or _TMode=="\083\101\109\105"or _TMode=="\077\097\110\117\097\108"and not _ClutchOn)and I.UserInputState==Enum.UserInputState.Begin))then if _CGear==0 then _ClutchOn=true end _CGear=math.min(_CGear+1,#_Tune.Ratios-2)elseif _IsOn and((I.KeyCode==a.ContlrClutch or _MSteer and I.KeyCode==a.MouseClutch or not _MSteer and I.KeyCode==a.Clutch)and _TMode=="\077\097\110\117\097\108")then if I.UserInputState==Enum.UserInputState.Begin then _ClutchOn=false _ClPressing=true elseif I.UserInputState==Enum.UserInputState.End then _ClutchOn=true _ClPressing=false end elseif _IsOn and I.KeyCode==a.ContlrPBrake or _MSteer and I.KeyCode==a.MousePBrake or not _MSteer and I.KeyCode==a.PBrake then if I.UserInputState==Enum.UserInputState.Begin then _PBrake=not _PBrake elseif I.UserInputState==Enum.UserInputState.End then if car.DriveSeat.Velocity.Magnitude>5 then _PBrake=false end end elseif(I.KeyCode==a.ContlrToggleTMode or I.KeyCode==a.ToggleTransMode)and I.UserInputState==Enum.UserInputState.Begin then local a=1 for I,X in pairs(_Tune.TransModes)do if X==_TMode then a=I break end end a=a+1 if a>#_Tune.TransModes then a=1 end _TMode=_Tune.TransModes[a]elseif _IsOn and(not _MSteer and(I.KeyCode==a.Throttle or I.KeyCode==a.Throttle2))or((a.MouseThrottle==Enum.UserInputType.MouseButton1 or a.MouseThrottle==Enum.UserInputType.MouseButton2)and I.UserInputType==a.MouseThrottle or I.KeyCode==a.MouseThrottle)and _MSteer then if I.UserInputState==Enum.UserInputState.Begin then _GThrot=1*_GThrotShift else _GThrot=(_Tune.IdleThrottle/100)*_GThrotShift end elseif not _MSteer and(I.KeyCode==a.Brake or I.KeyCode==a.Brake2)or((a.MouseBrake==Enum.UserInputType.MouseButton1 or a.MouseBrake==Enum.UserInputType.MouseButton2)and I.UserInputType==a.MouseBrake or I.KeyCode==a.MouseBrake)and _MSteer then if I.UserInputState==Enum.UserInputState.Begin then _GBrake=1 else _GBrake=0 end elseif not _MSteer and(I.KeyCode==a.SteerLeft or I.KeyCode==a.SteerLeft2)then if I.UserInputState==Enum.UserInputState.Begin then _GSteerT=-1 _SteerL=true else if _SteerR then _GSteerT=1 else _GSteerT=0 end _SteerL=false end elseif not _MSteer and(I.KeyCode==a.SteerRight or I.KeyCode==a.SteerRight2)then if I.UserInputState==Enum.UserInputState.Begin then _GSteerT=1 _SteerR=true else if _SteerL then _GSteerT=-1 else _GSteerT=0 end _SteerR=false end elseif I.KeyCode==a.ToggleMouseDrive then if I.UserInputState==Enum.UserInputState.End then _MSteer=not _MSteer _GThrot=(_Tune.IdleThrottle/100)*_GThrotShift _GBrake=0 _GSteerT=0 _ClutchOn=true end elseif _Tune.TCSEnabled and(_IsOn and I.KeyCode==a.ToggleTCS)or I.KeyCode==a.ContlrToggleTCS then if I.UserInputState==Enum.UserInputState.End then _TCS=not _TCS end elseif _Tune.ABSEnabled and(_IsOn and I.KeyCode==a.ToggleABS)or I.KeyCode==a.ContlrToggleABS then if I.UserInputState==Enum.UserInputState.End then _ABS=not _ABS end end if I.UserInputType.Name:find("\071\097\109\101\112\097\100")then if I.KeyCode==a.ContlrSteer then if I.Position.X>=0 then local a=math.min(.99,_Tune.Peripherals.ControlRDZone/100)if math.abs(I.Position.X)>a then _GSteerT=(I.Position.X-a)/(1-a)else _GSteerT=0 end else local a=math.min(.99,_Tune.Peripherals.ControlLDZone/100)if math.abs(I.Position.X)>a then _GSteerT=(I.Position.X+a)/(1-a)else _GSteerT=0 end end elseif _IsOn and I.KeyCode==a.ContlrThrottle then _GThrot=math.max(_Tune.IdleThrottle/100,I.Position.Z)*_GThrotShift elseif I.KeyCode==a.ContlrBrake then _GBrake=I.Position.Z end end else _GThrot=(_Tune.IdleThrottle/100)*_GThrotShift _GSteerT=0 _GBrake=0 if _CGear~=0 then _ClutchOn=true end end end UserInputService.InputBegan:connect(DealWithInput)UserInputService.InputChanged:connect(DealWithInput)UserInputService.InputEnded:connect(DealWithInput) | --[[Controls]]
local _CTRL = _Tune.Controls
local Controls = Instance.new("Folder", script.Parent)
Controls.Name = "Controls"
for i, v in pairs(_CTRL) do
local a = Instance.new("StringValue", Controls)
a.Name = i
a.Value = v.Name
a.Changed:connect(function()
if i == "MouseThrottle" or i == "MouseBrake" then
if a.Value == "MouseButton1" or a.Value == "MouseButton2" then
_CTRL[i] = Enum.UserInputType[a.Value]
else
_CTRL[i] = Enum.KeyCode[a.Value]
end
else
_CTRL[i] = Enum.KeyCode[a.Value]
end
end)
end
--Deadzone Adjust
local _PPH = _Tune.Peripherals
for i, v in pairs(_PPH) do
local a = Instance.new("IntValue", Controls)
a.Name = i
a.Value = v
a.Changed:connect(function()
a.Value = math.min(100, math.max(0, a.Value))
_PPH[i] = a.Value
end)
end
--Input Handler
function DealWithInput(input, IsRobloxFunction)
if (UserInputService:GetFocusedTextBox() == nil) and not _InControls then --Ignore when UI Focus
--Shift Down [Manual Transmission]
if
_IsOn
and (input.KeyCode == _CTRL["ContlrShiftDown"] or (_MSteer and input.KeyCode == _CTRL["MouseShiftDown"]) or ((not _MSteer) and input.KeyCode == _CTRL["ShiftDown"]))
and (_TMode == "Auto" or _TMode == "Semi" or (_TMode == "Manual" and not _ClutchOn))
and input.UserInputState == Enum.UserInputState.Begin
then
if _CGear == 0 then
_ClutchOn = true
end
_CGear = math.max(_CGear - 1, -1)
--Shift Up [Manual Transmission]
elseif
_IsOn
and (input.KeyCode == _CTRL["ContlrShiftUp"] or (_MSteer and input.KeyCode == _CTRL["MouseShiftUp"]) or ((not _MSteer) and input.KeyCode == _CTRL["ShiftUp"]))
and (_TMode == "Auto" or _TMode == "Semi" or (_TMode == "Manual" and not _ClutchOn))
and input.UserInputState == Enum.UserInputState.Begin
then
if _CGear == 0 then
_ClutchOn = true
end
_CGear = math.min(_CGear + 1, #_Tune.Ratios - 2)
--Toggle Clutch
elseif
_IsOn
and (input.KeyCode == _CTRL["ContlrClutch"] or (_MSteer and input.KeyCode == _CTRL["MouseClutch"]) or ((not _MSteer) and input.KeyCode == _CTRL["Clutch"]))
and _TMode == "Manual"
then
if input.UserInputState == Enum.UserInputState.Begin then
_ClutchOn = false
_ClPressing = true
elseif input.UserInputState == Enum.UserInputState.End then
_ClutchOn = true
_ClPressing = false
end
--Toggle PBrake
elseif
_IsOn and input.KeyCode == _CTRL["ContlrPBrake"]
or (_MSteer and input.KeyCode == _CTRL["MousePBrake"])
or ((not _MSteer) and input.KeyCode == _CTRL["PBrake"])
then
if input.UserInputState == Enum.UserInputState.Begin then
_PBrake = not _PBrake
elseif input.UserInputState == Enum.UserInputState.End then
if car.DriveSeat.Velocity.Magnitude > 5 then
_PBrake = false
end
end
--Toggle Transmission Mode
elseif
(input.KeyCode == _CTRL["ContlrToggleTMode"] or input.KeyCode == _CTRL["ToggleTransMode"])
and input.UserInputState == Enum.UserInputState.Begin
then
local n = 1
for i, v in pairs(_Tune.TransModes) do
if v == _TMode then
n = i
break
end
end
n = n + 1
if n > #_Tune.TransModes then
n = 1
end
_TMode = _Tune.TransModes[n]
--Throttle
elseif
_IsOn and ((not _MSteer) and (input.KeyCode == _CTRL["Throttle"] or input.KeyCode == _CTRL["Throttle2"]))
or (
(
(
(
_CTRL["MouseThrottle"] == Enum.UserInputType.MouseButton1
or _CTRL["MouseThrottle"] == Enum.UserInputType.MouseButton2
) and input.UserInputType == _CTRL["MouseThrottle"]
) or input.KeyCode == _CTRL["MouseThrottle"]
) and _MSteer
)
then
if input.UserInputState == Enum.UserInputState.Begin then
_GThrot = 1 * _GThrotShift
else
_GThrot = _Tune.IdleThrottle / 100 * _GThrotShift
end
--Brake
elseif
((not _MSteer) and (input.KeyCode == _CTRL["Brake"] or input.KeyCode == _CTRL["Brake2"]))
or (
(
(
(
_CTRL["MouseBrake"] == Enum.UserInputType.MouseButton1
or _CTRL["MouseBrake"] == Enum.UserInputType.MouseButton2
) and input.UserInputType == _CTRL["MouseBrake"]
) or input.KeyCode == _CTRL["MouseBrake"]
) and _MSteer
)
then
if input.UserInputState == Enum.UserInputState.Begin then
_GBrake = 1
else
_GBrake = 0
end
--Steer Left
elseif (not _MSteer) and (input.KeyCode == _CTRL["SteerLeft"] or input.KeyCode == _CTRL["SteerLeft2"]) then
if input.UserInputState == Enum.UserInputState.Begin then
_GSteerT = -1
_SteerL = true
else
if _SteerR then
_GSteerT = 1
else
_GSteerT = 0
end
_SteerL = false
end
--Steer Right
elseif (not _MSteer) and (input.KeyCode == _CTRL["SteerRight"] or input.KeyCode == _CTRL["SteerRight2"]) then
if input.UserInputState == Enum.UserInputState.Begin then
_GSteerT = 1
_SteerR = true
else
if _SteerL then
_GSteerT = -1
else
_GSteerT = 0
end
_SteerR = false
end
--Toggle Mouse Controls
elseif input.KeyCode == _CTRL["ToggleMouseDrive"] then
if input.UserInputState == Enum.UserInputState.End then
_MSteer = not _MSteer
_GThrot = _Tune.IdleThrottle / 100 * _GThrotShift
_GBrake = 0
_GSteerT = 0
_ClutchOn = true
end
--Toggle TCS
elseif
_Tune.TCSEnabled and _IsOn and input.KeyCode == _CTRL["ToggleTCS"]
or input.KeyCode == _CTRL["ContlrToggleTCS"]
then
if input.UserInputState == Enum.UserInputState.End then
_TCS = not _TCS
end
--Toggle ABS
elseif
_Tune.ABSEnabled and _IsOn and input.KeyCode == _CTRL["ToggleABS"]
or input.KeyCode == _CTRL["ContlrToggleABS"]
then
if input.UserInputState == Enum.UserInputState.End then
_ABS = not _ABS
end
end
--Variable Controls
if input.UserInputType.Name:find("Gamepad") then
--Gamepad Steering
if input.KeyCode == _CTRL["ContlrSteer"] then
if input.Position.X >= 0 then
local cDZone = math.min(0.99, _Tune.Peripherals.ControlRDZone / 100)
if math.abs(input.Position.X) > cDZone then
_GSteerT = (input.Position.X - cDZone) / (1 - cDZone)
else
_GSteerT = 0
end
else
local cDZone = math.min(0.99, _Tune.Peripherals.ControlLDZone / 100)
if math.abs(input.Position.X) > cDZone then
_GSteerT = (input.Position.X + cDZone) / (1 - cDZone)
else
_GSteerT = 0
end
end
--Gamepad Throttle
elseif _IsOn and input.KeyCode == _CTRL["ContlrThrottle"] then
_GThrot = math.max(_Tune.IdleThrottle / 100, input.Position.Z) * _GThrotShift
--Gamepad Brake
elseif input.KeyCode == _CTRL["ContlrBrake"] then
_GBrake = input.Position.Z
end
end
else
_GThrot = _Tune.IdleThrottle / 100 * _GThrotShift
_GSteerT = 0
_GBrake = 0
if _CGear ~= 0 then
_ClutchOn = true
end
end
end
UserInputService.InputBegan:connect(DealWithInput)
UserInputService.InputChanged:connect(DealWithInput)
UserInputService.InputEnded:connect(DealWithInput)
|
Tune.ABSEnabled=true Tune.ABSThreshold=20 Tune.FBrakeForce=15000 Tune.RBrakeForce=15000 Tune.PBrakeForce=50000 Tune.FLgcyBForce=15000 Tune.RLgcyBForce=10000 Tune.LgcyPBForce=25000 | --[[Brakes]]
Tune.ABSEnabled = true -- Implements ABS
Tune.ABSThreshold = 20 -- Slip speed allowed before ABS starts working (in SPS)
Tune.FBrakeForce = 15000 -- Front brake force
Tune.RBrakeForce = 15000 -- Rear brake force
Tune.PBrakeForce = 50000 -- Handbrake force
Tune.FLgcyBForce = 15000 -- Front brake force [PGS OFF]
Tune.RLgcyBForce = 10000 -- Rear brake force [PGS OFF]
Tune.LgcyPBForce = 25000 -- Handbrake force [PGS OFF]
|
function BrioUtils.first(a,...)for a,I in pairs(a)do if Brio.isBrio(I)then if I:IsDead()then return Brio.DEAD end end end local I=Maid.new()local X=Brio.new(...)for a,u in pairs(a)do if Brio.isBrio(u)then I:GiveTask((u:GetDiedSignal()):Connect(function()X:Kill()end))end end I:GiveTask((X:GetDiedSignal()):Connect(function()I:DoCleaning()end))return X end | --[=[
Returns a brio that dies whenever the first Brio in the list
dies. The value of the Brio is the `...` value.
@param brios {Brio<T>}
@param ... U
@return Brio<U>
]=]
function BrioUtils.first(brios, ...)
for _, brio in pairs(brios) do
if Brio.isBrio(brio) then
if brio:IsDead() then
return Brio.DEAD
end
end
end
local maid = Maid.new()
local topBrio = Brio.new(...)
for _, brio in pairs(brios) do
if Brio.isBrio(brio) then
maid:GiveTask(brio:GetDiedSignal():Connect(function()
topBrio:Kill()
end))
end
end
maid:GiveTask(topBrio:GetDiedSignal():Connect(function()
maid:DoCleaning()
end))
return topBrio
end
|
local function a(a,I)script.BeepSound:Play()INFO_GUI.Visible=true INFO_GUI.Position=UDim2.new(.5,0,.15,0)INFO_GUI.InfoLabel.TextTransparency=1 INFO_GUI.InfoLabel.TextStrokeTransparency=1 INFO_GUI.InfoLabel.Text=a INFO_GUI.BackgroundLabel.Size=UDim2.new(0,0,1,0)if I then if script:FindFirstChild(I.."\083\111\117\110\100")then script[I.."\083\111\117\110\100"]:Play()end end local X=TweenInfo.new(.5,Enum.EasingStyle.Sine,Enum.EasingDirection.Out)local u=TweenInfo.new(.5,Enum.EasingStyle.Sine,Enum.EasingDirection.In)local M=TweenService:Create(INFO_GUI.InfoLabel,X,{TextTransparency=0,TextStrokeTransparency=0;Position=UDim2.new(.5,0,.2,0)})local U=TweenService:Create(INFO_GUI.BackgroundLabel,X,{Size=UDim2.new(1,0,1,0)})M:Play()U:Play()wait(5)local w=TweenService:Create(INFO_GUI.InfoLabel,u,{TextTransparency=1,TextStrokeTransparency=1;Position=UDim2.new(.5,0,.15,0)})local v=TweenService:Create(INFO_GUI.BackgroundLabel,u,{Size=UDim2.new(0,0,1,0)})w:Play()v:Play()wait(.5)INFO_GUI.Visible=false end | -- functions
local function Display(text, sound)
script.BeepSound:Play()
INFO_GUI.Visible = true
INFO_GUI.Position = UDim2.new(0.5, 0, 0.15, 0)
INFO_GUI.InfoLabel.TextTransparency = 1
INFO_GUI.InfoLabel.TextStrokeTransparency = 1
INFO_GUI.InfoLabel.Text = text
INFO_GUI.BackgroundLabel.Size = UDim2.new(0, 0, 1, 0)
if sound then
if script:FindFirstChild(sound .. "Sound") then
script[sound .. "Sound"]:Play()
end
end
local openInfo = TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)
local closeInfo = TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.In)
local openTweenA = TweenService:Create(
INFO_GUI.InfoLabel,
openInfo,
{ TextTransparency = 0, TextStrokeTransparency = 0, Position = UDim2.new(0.5, 0, 0.2, 0) }
)
local openTweenB = TweenService:Create(INFO_GUI.BackgroundLabel, openInfo, { Size = UDim2.new(1, 0, 1, 0) })
openTweenA:Play()
openTweenB:Play()
wait(5)
local closeTweenA = TweenService:Create(
INFO_GUI.InfoLabel,
closeInfo,
{ TextTransparency = 1, TextStrokeTransparency = 1, Position = UDim2.new(0.5, 0, 0.15, 0) }
)
local closeTweenB = TweenService:Create(INFO_GUI.BackgroundLabel, closeInfo, { Size = UDim2.new(0, 0, 1, 0) })
closeTweenA:Play()
closeTweenB:Play()
wait(0.5)
INFO_GUI.Visible = false
end
|
local a=2 local I=85 local X=5 local u=1.5 local M=2 | --Wheelie tune
local WheelieD = 2
local WheelieTq = 85
local WheelieP = 5
local WheelieMultiplier = 1.5
local WheelieDivider = 2
|
function onClicked()R.Function1.Disabled=true R.Function2.Disabled=false R.BrickColor=BrickColor.new("\073\110\115\116\105\116\117\116\105\111\110\097\108 \119\104\105\116\101")N.One1.BrickColor=BrickColor.new("\082\101\097\108\108\121 \098\108\097\099\107")N.One2.BrickColor=BrickColor.new("\082\101\097\108\108\121 \098\108\097\099\107")N.One4.BrickColor=BrickColor.new("\082\101\097\108\108\121 \098\108\097\099\107")N.One8.BrickColor=BrickColor.new("\082\101\097\108\108\121 \098\108\097\099\107")N.Three4.BrickColor=BrickColor.new("\082\101\097\108\108\121 \098\108\097\099\107")N.Four1.BrickColor=BrickColor.new("\082\101\097\108\108\121 \098\108\097\099\107")end script.Parent.ClickDetector.MouseClick:connect(onClicked) | -------------------------
function onClicked()
R.Function1.Disabled = true
R.Function2.Disabled = false
R.BrickColor = BrickColor.new("Institutional white")
N.One1.BrickColor = BrickColor.new("Really black")
N.One2.BrickColor = BrickColor.new("Really black")
N.One4.BrickColor = BrickColor.new("Really black")
N.One8.BrickColor = BrickColor.new("Really black")
N.Three4.BrickColor = BrickColor.new("Really black")
N.Four1.BrickColor = BrickColor.new("Really black")
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
|
Humanoid.Died:connect(onDied)Humanoid.Running:connect(onRunning)Humanoid.Jumping:connect(onJumping)Humanoid.Climbing:connect(onClimbing)Humanoid.GettingUp:connect(onGettingUp)Humanoid.FreeFalling:connect(onFreeFall)Humanoid.FallingDown:connect(onFallingDown)Humanoid.Seated:connect(onSeated)Humanoid.PlatformStanding:connect(onPlatformStanding)Humanoid.Swimming:connect(onSwimming) | -- connect events
Humanoid.Died:connect(onDied)
Humanoid.Running:connect(onRunning)
Humanoid.Jumping:connect(onJumping)
Humanoid.Climbing:connect(onClimbing)
Humanoid.GettingUp:connect(onGettingUp)
Humanoid.FreeFalling:connect(onFreeFall)
Humanoid.FallingDown:connect(onFallingDown)
Humanoid.Seated:connect(onSeated)
Humanoid.PlatformStanding:connect(onPlatformStanding)
Humanoid.Swimming:connect(onSwimming)
|
for a,I in pairs(siren:GetChildren())do if I:IsA("\073\109\097\103\101\066\117\116\116\111\110")and I.Name~="\104\101\097\100\101\114"then if string.match(I.Name,"\037\108\043")=="\115\114"then I.MouseButton1Click:connect(function()script.Parent.siren.Value=tonumber(string.match(I.Name,"\037\100"))if script.Parent.siren.Value==0 then siren.sr0.Image=imgassets.sirenson siren.sr1.Image=imgassets.wailoff siren.sr2.Image=imgassets.yelpoff siren.sr3.Image=imgassets.phaseroff siren.sr4.Image=imgassets.hilooff siren.sr5.Image=imgassets.hornoff siren.sr6.Image=imgassets.wailrumbleroff siren.sr7.Image=imgassets.yelprumbleroff siren.sr8.Image=imgassets.phaserrumbleroff siren.sr9.Image=imgassets.hyperhilooff elseif script.Parent.siren.Value==1 then siren.sr0.Image=imgassets.sirensoff siren.sr1.Image=imgassets.wailon siren.sr2.Image=imgassets.yelpoff siren.sr3.Image=imgassets.phaseroff siren.sr4.Image=imgassets.hilooff siren.sr5.Image=imgassets.hornoff siren.sr6.Image=imgassets.wailrumbleroff siren.sr7.Image=imgassets.yelprumbleroff siren.sr8.Image=imgassets.phaserrumbleroff siren.sr9.Image=imgassets.hyperhilooff elseif script.Parent.siren.Value==2 then siren.sr0.Image=imgassets.sirensoff siren.sr1.Image=imgassets.wailoff siren.sr2.Image=imgassets.yelpon siren.sr3.Image=imgassets.phaseroff siren.sr4.Image=imgassets.hilooff siren.sr5.Image=imgassets.hornoff siren.sr6.Image=imgassets.wailrumbleroff siren.sr7.Image=imgassets.yelprumbleroff siren.sr8.Image=imgassets.phaserrumbleroff siren.sr9.Image=imgassets.hyperhilooff elseif script.Parent.siren.Value==3 then siren.sr0.Image=imgassets.sirensoff siren.sr1.Image=imgassets.wailoff siren.sr2.Image=imgassets.yelpoff siren.sr3.Image=imgassets.phaseron siren.sr4.Image=imgassets.hilooff siren.sr5.Image=imgassets.hornoff siren.sr6.Image=imgassets.wailrumbleroff siren.sr7.Image=imgassets.yelprumbleroff siren.sr8.Image=imgassets.phaserrumbleroff siren.sr9.Image=imgassets.hyperhilooff elseif script.Parent.siren.Value==4 then siren.sr0.Image=imgassets.sirensoff siren.sr1.Image=imgassets.wailoff siren.sr2.Image=imgassets.yelpoff siren.sr3.Image=imgassets.phaseroff siren.sr4.Image=imgassets.hiloon siren.sr5.Image=imgassets.hornoff siren.sr6.Image=imgassets.wailrumbleroff siren.sr7.Image=imgassets.yelprumbleroff siren.sr8.Image=imgassets.phaserrumbleroff siren.sr9.Image=imgassets.hyperhilooff elseif script.Parent.siren.Value==5 then siren.sr0.Image=imgassets.sirensoff siren.sr1.Image=imgassets.wailoff siren.sr2.Image=imgassets.yelpoff siren.sr3.Image=imgassets.phaseroff siren.sr4.Image=imgassets.hilooff siren.sr5.Image=imgassets.hornon siren.sr6.Image=imgassets.wailrumbleroff siren.sr7.Image=imgassets.yelprumbleroff siren.sr8.Image=imgassets.phaserrumbleroff siren.sr9.Image=imgassets.hyperhilooff elseif script.Parent.siren.Value==6 then siren.sr0.Image=imgassets.sirensoff siren.sr1.Image=imgassets.wailoff siren.sr2.Image=imgassets.yelpoff siren.sr3.Image=imgassets.phaseroff siren.sr4.Image=imgassets.hilooff siren.sr5.Image=imgassets.hornoff siren.sr6.Image=imgassets.wailrumbleron siren.sr7.Image=imgassets.yelprumbleroff siren.sr8.Image=imgassets.phaserrumbleroff siren.sr9.Image=imgassets.hyperhilooff elseif script.Parent.siren.Value==7 then siren.sr0.Image=imgassets.sirensoff siren.sr1.Image=imgassets.wailoff siren.sr2.Image=imgassets.yelpon siren.sr3.Image=imgassets.phaseroff siren.sr4.Image=imgassets.hilooff siren.sr5.Image=imgassets.hornoff siren.sr6.Image=imgassets.wailrumbleroff siren.sr7.Image=imgassets.yelprumbleron siren.sr8.Image=imgassets.phaserrumbleroff siren.sr9.Image=imgassets.hyperhilooff elseif script.Parent.siren.Value==8 then siren.sr0.Image=imgassets.sirensoff siren.sr1.Image=imgassets.wailoff siren.sr2.Image=imgassets.yelpoff siren.sr3.Image=imgassets.phaseron siren.sr4.Image=imgassets.hilooff siren.sr5.Image=imgassets.hornoff siren.sr6.Image=imgassets.wailrumbleroff siren.sr7.Image=imgassets.yelprumbleroff siren.sr8.Image=imgassets.phaserrumbleron siren.sr9.Image=imgassets.hyperhilooff elseif script.Parent.siren.Value==9 then siren.sr0.Image=imgassets.sirensoff siren.sr1.Image=imgassets.wailoff siren.sr2.Image=imgassets.yelpoff siren.sr3.Image=imgassets.phaseroff siren.sr4.Image=imgassets.hilooff siren.sr5.Image=imgassets.hornoff siren.sr6.Image=imgassets.wailrumbleroff siren.sr7.Image=imgassets.yelprumbleroff siren.sr8.Image=imgassets.phaserrumbleroff siren.sr9.Image=imgassets.hyperhiloon end end)end end end for a,I in pairs(seats:GetChildren())do if I:IsA("\073\109\097\103\101\066\117\116\116\111\110")and I.Name~="\104\101\097\100\101\114"then if string.match(I.Name,"\037\117\037\108\043")=="\083\101\097\116"then local a=seat:findFirstChild("\083\101\097\116"..tonumber(string.match(I.Name,"\037\100")))if a.Value then I.Image=imgassets.lockon else I.Image=imgassets.lockoff end I.MouseButton1Click:connect(function()a.Value=not a.Value if a.Value then I.Image=imgassets.lockon seat.Parent.SSC.Beep:Play()else I.Image=imgassets.lockoff seat.Parent.SSC.Beep:Play()end end)end end end while true do wait(.1)script.Parent.Speed.Text="\083\112\101\101\100\058 "..math.floor(seat.Velocity.Magnitude/2)end | -----------------------------------------------------------------------------------------------
for _, i in pairs(siren:GetChildren()) do
if i:IsA("ImageButton") and i.Name ~= "header" then
if string.match(i.Name, "%l+") == "sr" then
i.MouseButton1Click:connect(function()
script.Parent.siren.Value = tonumber(string.match(i.Name, "%d"))
if script.Parent.siren.Value == 0 then
siren.sr0.Image = imgassets.sirenson
siren.sr1.Image = imgassets.wailoff
siren.sr2.Image = imgassets.yelpoff
siren.sr3.Image = imgassets.phaseroff
siren.sr4.Image = imgassets.hilooff
siren.sr5.Image = imgassets.hornoff
siren.sr6.Image = imgassets.wailrumbleroff
siren.sr7.Image = imgassets.yelprumbleroff
siren.sr8.Image = imgassets.phaserrumbleroff
siren.sr9.Image = imgassets.hyperhilooff
elseif script.Parent.siren.Value == 1 then
siren.sr0.Image = imgassets.sirensoff
siren.sr1.Image = imgassets.wailon
siren.sr2.Image = imgassets.yelpoff
siren.sr3.Image = imgassets.phaseroff
siren.sr4.Image = imgassets.hilooff
siren.sr5.Image = imgassets.hornoff
siren.sr6.Image = imgassets.wailrumbleroff
siren.sr7.Image = imgassets.yelprumbleroff
siren.sr8.Image = imgassets.phaserrumbleroff
siren.sr9.Image = imgassets.hyperhilooff
elseif script.Parent.siren.Value == 2 then
siren.sr0.Image = imgassets.sirensoff
siren.sr1.Image = imgassets.wailoff
siren.sr2.Image = imgassets.yelpon
siren.sr3.Image = imgassets.phaseroff
siren.sr4.Image = imgassets.hilooff
siren.sr5.Image = imgassets.hornoff
siren.sr6.Image = imgassets.wailrumbleroff
siren.sr7.Image = imgassets.yelprumbleroff
siren.sr8.Image = imgassets.phaserrumbleroff
siren.sr9.Image = imgassets.hyperhilooff
elseif script.Parent.siren.Value == 3 then
siren.sr0.Image = imgassets.sirensoff
siren.sr1.Image = imgassets.wailoff
siren.sr2.Image = imgassets.yelpoff
siren.sr3.Image = imgassets.phaseron
siren.sr4.Image = imgassets.hilooff
siren.sr5.Image = imgassets.hornoff
siren.sr6.Image = imgassets.wailrumbleroff
siren.sr7.Image = imgassets.yelprumbleroff
siren.sr8.Image = imgassets.phaserrumbleroff
siren.sr9.Image = imgassets.hyperhilooff
elseif script.Parent.siren.Value == 4 then
siren.sr0.Image = imgassets.sirensoff
siren.sr1.Image = imgassets.wailoff
siren.sr2.Image = imgassets.yelpoff
siren.sr3.Image = imgassets.phaseroff
siren.sr4.Image = imgassets.hiloon
siren.sr5.Image = imgassets.hornoff
siren.sr6.Image = imgassets.wailrumbleroff
siren.sr7.Image = imgassets.yelprumbleroff
siren.sr8.Image = imgassets.phaserrumbleroff
siren.sr9.Image = imgassets.hyperhilooff
elseif script.Parent.siren.Value == 5 then
siren.sr0.Image = imgassets.sirensoff
siren.sr1.Image = imgassets.wailoff
siren.sr2.Image = imgassets.yelpoff
siren.sr3.Image = imgassets.phaseroff
siren.sr4.Image = imgassets.hilooff
siren.sr5.Image = imgassets.hornon
siren.sr6.Image = imgassets.wailrumbleroff
siren.sr7.Image = imgassets.yelprumbleroff
siren.sr8.Image = imgassets.phaserrumbleroff
siren.sr9.Image = imgassets.hyperhilooff
elseif script.Parent.siren.Value == 6 then
siren.sr0.Image = imgassets.sirensoff
siren.sr1.Image = imgassets.wailoff
siren.sr2.Image = imgassets.yelpoff
siren.sr3.Image = imgassets.phaseroff
siren.sr4.Image = imgassets.hilooff
siren.sr5.Image = imgassets.hornoff
siren.sr6.Image = imgassets.wailrumbleron
siren.sr7.Image = imgassets.yelprumbleroff
siren.sr8.Image = imgassets.phaserrumbleroff
siren.sr9.Image = imgassets.hyperhilooff
elseif script.Parent.siren.Value == 7 then
siren.sr0.Image = imgassets.sirensoff
siren.sr1.Image = imgassets.wailoff
siren.sr2.Image = imgassets.yelpon
siren.sr3.Image = imgassets.phaseroff
siren.sr4.Image = imgassets.hilooff
siren.sr5.Image = imgassets.hornoff
siren.sr6.Image = imgassets.wailrumbleroff
siren.sr7.Image = imgassets.yelprumbleron
siren.sr8.Image = imgassets.phaserrumbleroff
siren.sr9.Image = imgassets.hyperhilooff
elseif script.Parent.siren.Value == 8 then
siren.sr0.Image = imgassets.sirensoff
siren.sr1.Image = imgassets.wailoff
siren.sr2.Image = imgassets.yelpoff
siren.sr3.Image = imgassets.phaseron
siren.sr4.Image = imgassets.hilooff
siren.sr5.Image = imgassets.hornoff
siren.sr6.Image = imgassets.wailrumbleroff
siren.sr7.Image = imgassets.yelprumbleroff
siren.sr8.Image = imgassets.phaserrumbleron
siren.sr9.Image = imgassets.hyperhilooff
elseif script.Parent.siren.Value == 9 then
siren.sr0.Image = imgassets.sirensoff
siren.sr1.Image = imgassets.wailoff
siren.sr2.Image = imgassets.yelpoff
siren.sr3.Image = imgassets.phaseroff
siren.sr4.Image = imgassets.hilooff
siren.sr5.Image = imgassets.hornoff
siren.sr6.Image = imgassets.wailrumbleroff
siren.sr7.Image = imgassets.yelprumbleroff
siren.sr8.Image = imgassets.phaserrumbleroff
siren.sr9.Image = imgassets.hyperhiloon
end
end)
end
end
end
for _, i in pairs(seats:GetChildren()) do
if i:IsA("ImageButton") and i.Name ~= "header" then
if string.match(i.Name, "%u%l+") == "Seat" then
local a = seat:findFirstChild("Seat" .. tonumber(string.match(i.Name, "%d")))
if a.Value then
i.Image = imgassets.lockon
else
i.Image = imgassets.lockoff
end
i.MouseButton1Click:connect(function()
a.Value = not a.Value
if a.Value then
i.Image = imgassets.lockon
seat.Parent.SSC.Beep:Play()
else
i.Image = imgassets.lockoff
seat.Parent.SSC.Beep:Play()
end
end)
end
end
end
while true do
wait(0.1)
script.Parent.Speed.Text = ("Speed: " .. math.floor(seat.Velocity.Magnitude / 2))
end
|
function Promise.new(a)local I={_source=debug.traceback(),_type="\080\114\111\109\105\115\101";_status=Promise.Status.Started,_value=nil,_unhandledRejection=false,_queuedResolve={};_queuedReject={}}setmetatable(I,Promise)local function X(...)I:_resolve(...)end local function u(...)I:_reject(...)end local M,U=wpcall(a,X,u)if not M and I._status==Promise.Status.Started then u(U)end return I end | --[[
Constructs a new Promise with the given initializing callback.
This is generally only called when directly wrapping a non-promise API into
a promise-based version.
The callback will receive 'resolve' and 'reject' methods, used to start
invoking the promise chain.
For example:
local function get(url)
return Promise.new(function(resolve, reject)
spawn(function()
resolve(HttpService:GetAsync(url))
end)
end)
end
get("https://google.com")
:andThen(function(stuff)
print("Got some stuff!", stuff)
end)
]]
function Promise.new(callback)
local promise = {
-- Used to locate where a promise was created
_source = debug.traceback(),
-- A tag to identify us as a promise
_type = "Promise",
_status = Promise.Status.Started,
-- A table containing a list of all results, whether success or failure.
-- Only valid if _status is set to something besides Started
_value = nil,
-- If an error occurs with no observers, this will be set.
_unhandledRejection = false,
-- Queues representing functions we should invoke when we update!
_queuedResolve = {},
_queuedReject = {},
}
setmetatable(promise, Promise)
local function resolve(...)
promise:_resolve(...)
end
local function reject(...)
promise:_reject(...)
end
local ok, err = wpcall(callback, resolve, reject)
if not ok and promise._status == Promise.Status.Started then
reject(err)
end
return promise
end
|
local a=5 local I=16 | --WalkSpeedsHere!
local WalkSpeedWhileCrouching = 5
local CurrentWalkSpeed = 16
|
script.Parent.MouseButton1Down:Connect(function()script.Parent.Parent.Parent.AlienAnimationREAL.Fired:Fire()end) | -- Decompiled with the Synapse X Luau decompiler.
script.Parent.MouseButton1Down:Connect(function()
script.Parent.Parent.Parent.AlienAnimationREAL.Fired:Fire()
end)
|
function ZoneController.getZones()local a={}for I,X in pairs(registeredZones)do table.insert(a,I)end return a end | -- PUBLIC FUNCTIONS
function ZoneController.getZones()
local registeredZonesArray = {}
for zone, _ in pairs(registeredZones) do
table.insert(registeredZonesArray, zone)
end
return registeredZonesArray
end
|
local a=20 local I=3 local X=Enum.EasingStyle.Quad local u=Enum.EasingDirection.InOut local M=0 local U=false local w=0 | --CONFIG VARIABLES
local tweenTime = 20
local closeWaitTime = 3
local easingStyle = Enum.EasingStyle.Quad
local easingDirection = Enum.EasingDirection.InOut
local repeats = 0
local reverse = false
local delayTime = 0
|
self.RightLowReady=CFrame.new(-0.9,1.25,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))self.LeftLowReady=CFrame.new(1,1,-0.6)*CFrame.Angles(math.rad(-45),math.rad(15),math.rad(-25))self.RightElbowLowReady=CFrame.new(0,-0.45,-0.25)*CFrame.Angles(math.rad(-80),math.rad(0),math.rad(0))self.LeftElbowLowReady=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))self.RightWristLowReady=CFrame.new(0,0,.15)*CFrame.Angles(math.rad(20),math.rad(0),math.rad(0))self.LeftWristLowReady=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)) | ------//Low Ready Animations
self.RightLowReady = CFrame.new(-0.9, 1.25, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
self.LeftLowReady = CFrame.new(1, 1, -0.6) * CFrame.Angles(math.rad(-45), math.rad(15), math.rad(-25))
self.RightElbowLowReady = CFrame.new(0, -0.45, -0.25) * CFrame.Angles(math.rad(-80), math.rad(0), math.rad(0))
self.LeftElbowLowReady = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
self.RightWristLowReady = CFrame.new(0, 0, 0.15) * CFrame.Angles(math.rad(20), math.rad(0), math.rad(0))
self.LeftWristLowReady = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
|
Humanoid.Died:connect(onDied)Humanoid.Running:connect(onRunning)Humanoid.Jumping:connect(onJumping)Humanoid.Climbing:connect(onClimbing)Humanoid.GettingUp:connect(onGettingUp)Humanoid.FreeFalling:connect(onFreeFall)Humanoid.FallingDown:connect(onFallingDown)Humanoid.Seated:connect(onSeated) | -- connect events
Humanoid.Died:connect(onDied)
Humanoid.Running:connect(onRunning)
Humanoid.Jumping:connect(onJumping)
Humanoid.Climbing:connect(onClimbing)
Humanoid.GettingUp:connect(onGettingUp)
Humanoid.FreeFalling:connect(onFreeFall)
Humanoid.FallingDown:connect(onFallingDown)
Humanoid.Seated:connect(onSeated)
|
local a={}a.Version=script.Parent.Version.Value a.Services={}a.Util=script.Parent.Util local I=Instance.new("\070\111\108\100\101\114")I.Name="\083\101\114\118\105\099\101\115"local X=require(a.Util.Promise)local u=require(a.Util.Signal)local M=require(a.Util.Loader)local U=require(a.Util.Ser)local w=require(a.Util.Remote.RemoteSignal)local v=require(a.Util.Remote.RemoteProperty)local r=require(a.Util.TableUtil)local N=false local Y=false local H=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")local function m(a)local I=Instance.new("\070\111\108\100\101\114")I.Name=a return I end local function J(a,I)local X=a:FindFirstChild(I)if not X then X=Instance.new("\070\111\108\100\101\114")X.Name=I X.Parent=a end return X end local function O(a,X,u)if u then X.Parent=J(a._knit_rep_folder,u)elseif X:IsA("\082\101\109\111\116\101\070\117\110\099\116\105\111\110")then X.Parent=J(a._knit_rep_folder,"\082\070")elseif X:IsA("\082\101\109\111\116\101\069\118\101\110\116")then X.Parent=J(a._knit_rep_folder,"\082\069")elseif X:IsA("\086\097\108\117\101\066\097\115\101")then X.Parent=J(a._knit_rep_folder,"\082\080")else error("\073\110\118\097\108\105\100 \114\101\112 \111\098\106\101\099\116\058 "..X.ClassName)end if not a._knit_rep_folder.Parent then a._knit_rep_folder.Parent=I end end function a.IsService(a)return type(a)=="\116\097\098\108\101"and a._knit_is_service==true end function a.CreateService(I)assert(type(I)=="\116\097\098\108\101","\083\101\114\118\105\099\101 \109\117\115\116 \098\101 \097 \116\097\098\108\101\059 \103\111\116 "..type(I))assert(type(I.Name)=="\115\116\114\105\110\103","\083\101\114\118\105\099\101\046\078\097\109\101 \109\117\115\116 \098\101 \097 \115\116\114\105\110\103\059 \103\111\116 "..type(I.Name))assert(#I.Name>0,"\083\101\114\118\105\099\101\046\078\097\109\101 \109\117\115\116 \098\101 \097 \110\111\110-\101\109\112\116\121 \115\116\114\105\110\103")assert(a.Services[I.Name]==nil,"\083\101\114\118\105\099\101 \""..(I.Name.."\" \097\108\114\101\097\100\121 \101\120\105\115\116\115"))I=r.Assign(I,{_knit_is_service=true,_knit_rf={};_knit_re={},_knit_rp={},_knit_rep_folder=m(I.Name)})if type(I.Client)~="\116\097\098\108\101"then I.Client={Server=I}else if I.Client.Server~=I then I.Client.Server=I end end a.Services[I.Name]=I return I end function a.AddServices(a)return M.LoadChildren(a)end function a.AddServicesDeep(a)return M.LoadDescendants(a)end function a.GetService(I)assert(type(I)=="\115\116\114\105\110\103","\083\101\114\118\105\099\101\078\097\109\101 \109\117\115\116 \098\101 \097 \115\116\114\105\110\103\059 \103\111\116 "..type(I))return assert(a.Services[I],"\067\111\117\108\100 \110\111\116 \102\105\110\100 \115\101\114\118\105\099\101 \""..(I.."\""))end function a.BindRemoteEvent(a,I,X)assert(a._knit_re[I]==nil,"\082\101\109\111\116\101\069\118\101\110\116 \""..(I.."\" \097\108\114\101\097\100\121 \101\120\105\115\116\115"))local u=X._remote u.Name=I a._knit_re[I]=u O(a,u)end function a.BindRemoteFunction(a,I,X)assert(a._knit_rf[I]==nil,"\082\101\109\111\116\101\070\117\110\099\116\105\111\110 \""..(I.."\" \097\108\114\101\097\100\121 \101\120\105\115\116\115"))local u=Instance.new("\082\101\109\111\116\101\070\117\110\099\116\105\111\110")u.Name=I a._knit_rf[I]=u O(a,u)function u.OnServerInvoke(...)return U.SerializeArgsAndUnpack(X(a.Client,U.DeserializeArgsAndUnpack(...)))end end function a.BindRemoteProperty(a,I,X)assert(a._knit_rp[I]==nil,"\082\101\109\111\116\101\080\114\111\112\101\114\116\121 \""..(I.."\" \097\108\114\101\097\100\121 \101\120\105\115\116\115"))X._object.Name=I a._knit_rp[I]=X O(a,X._object,"\082\080")end function a.Start()if N then return X.Reject("\075\110\105\116 \097\108\114\101\097\100\121 \115\116\097\114\116\101\100")end N=true local M=a.Services return(X.new(function(I)for I,X in pairs(M)do for I,M in pairs(X.Client)do if type(M)=="\102\117\110\099\116\105\111\110"then a.BindRemoteFunction(X,I,M)elseif w.Is(M)then a.BindRemoteEvent(X,I,M)elseif v.Is(M)then a.BindRemoteProperty(X,I,M)elseif u.Is(M)then warn("\070\111\117\110\100 \083\105\103\110\097\108 \105\110\115\116\101\097\100 \111\102 \082\101\109\111\116\101\083\105\103\110\097\108 \040\075\110\105\116\046\085\116\105\108\046\082\101\109\111\116\101\083\105\103\110\097\108\041\046 \080\108\101\097\115\101 \099\104\097\110\103\101 \116\111 \082\101\109\111\116\101\083\105\103\110\097\108\046 \091"..(X.Name..("\046\067\108\105\101\110\116\046"..(I.."\093"))))end end end local U={}for a,I in pairs(M)do if type(I.KnitInit)=="\102\117\110\099\116\105\111\110"then table.insert(U,X.new(function(a)I:KnitInit()a()end))end end I(X.All(U))end)):Then(function()for a,I in pairs(M)do if type(I.KnitStart)=="\102\117\110\099\116\105\111\110"then task.spawn(I.KnitStart,I)end end Y=true H:Fire()task.defer(function()H:Destroy()end)I.Parent=script.Parent end)end function a.OnStart()if Y then return X.Resolve()else return X.FromEvent(H.Event)end end return a | --[[
Knit.CreateService(service): Service
Knit.AddServices(folder): Service[]
Knit.AddServicesDeep(folder): Service[]
Knit.Start(): Promise<void>
Knit.OnStart(): Promise<void>
--]]
local KnitServer = {}
KnitServer.Version = script.Parent.Version.Value
KnitServer.Services = {}
KnitServer.Util = script.Parent.Util
local knitRepServiceFolder = Instance.new("Folder")
knitRepServiceFolder.Name = "Services"
local Promise = require(KnitServer.Util.Promise)
local Signal = require(KnitServer.Util.Signal)
local Loader = require(KnitServer.Util.Loader)
local Ser = require(KnitServer.Util.Ser)
local RemoteSignal = require(KnitServer.Util.Remote.RemoteSignal)
local RemoteProperty = require(KnitServer.Util.Remote.RemoteProperty)
local TableUtil = require(KnitServer.Util.TableUtil)
local started = false
local startedComplete = false
local onStartedComplete = Instance.new("BindableEvent")
local function CreateRepFolder(serviceName)
local folder = Instance.new("Folder")
folder.Name = serviceName
return folder
end
local function GetFolderOrCreate(parent, name)
local f = parent:FindFirstChild(name)
if not f then
f = Instance.new("Folder")
f.Name = name
f.Parent = parent
end
return f
end
local function AddToRepFolder(service, remoteObj, folderOverride)
if folderOverride then
remoteObj.Parent = GetFolderOrCreate(service._knit_rep_folder, folderOverride)
elseif remoteObj:IsA("RemoteFunction") then
remoteObj.Parent = GetFolderOrCreate(service._knit_rep_folder, "RF")
elseif remoteObj:IsA("RemoteEvent") then
remoteObj.Parent = GetFolderOrCreate(service._knit_rep_folder, "RE")
elseif remoteObj:IsA("ValueBase") then
remoteObj.Parent = GetFolderOrCreate(service._knit_rep_folder, "RP")
else
error("Invalid rep object: " .. remoteObj.ClassName)
end
if not service._knit_rep_folder.Parent then
service._knit_rep_folder.Parent = knitRepServiceFolder
end
end
function KnitServer.IsService(object)
return type(object) == "table" and object._knit_is_service == true
end
function KnitServer.CreateService(service)
assert(type(service) == "table", "Service must be a table; got " .. type(service))
assert(type(service.Name) == "string", "Service.Name must be a string; got " .. type(service.Name))
assert(#service.Name > 0, "Service.Name must be a non-empty string")
assert(KnitServer.Services[service.Name] == nil, 'Service "' .. service.Name .. '" already exists')
service = TableUtil.Assign(service, {
_knit_is_service = true,
_knit_rf = {},
_knit_re = {},
_knit_rp = {},
_knit_rep_folder = CreateRepFolder(service.Name),
})
if type(service.Client) ~= "table" then
service.Client = { Server = service }
else
if service.Client.Server ~= service then
service.Client.Server = service
end
end
KnitServer.Services[service.Name] = service
return service
end
function KnitServer.AddServices(folder)
return Loader.LoadChildren(folder)
end
function KnitServer.AddServicesDeep(folder)
return Loader.LoadDescendants(folder)
end
function KnitServer.GetService(serviceName)
assert(type(serviceName) == "string", "ServiceName must be a string; got " .. type(serviceName))
return assert(KnitServer.Services[serviceName], 'Could not find service "' .. serviceName .. '"')
end
function KnitServer.BindRemoteEvent(service, eventName, remoteEvent)
assert(service._knit_re[eventName] == nil, 'RemoteEvent "' .. eventName .. '" already exists')
local re = remoteEvent._remote
re.Name = eventName
service._knit_re[eventName] = re
AddToRepFolder(service, re)
end
function KnitServer.BindRemoteFunction(service, funcName, func)
assert(service._knit_rf[funcName] == nil, 'RemoteFunction "' .. funcName .. '" already exists')
local rf = Instance.new("RemoteFunction")
rf.Name = funcName
service._knit_rf[funcName] = rf
AddToRepFolder(service, rf)
function rf.OnServerInvoke(...)
return Ser.SerializeArgsAndUnpack(func(service.Client, Ser.DeserializeArgsAndUnpack(...)))
end
end
function KnitServer.BindRemoteProperty(service, propName, prop)
assert(service._knit_rp[propName] == nil, 'RemoteProperty "' .. propName .. '" already exists')
prop._object.Name = propName
service._knit_rp[propName] = prop
AddToRepFolder(service, prop._object, "RP")
end
function KnitServer.Start()
if started then
return Promise.Reject("Knit already started")
end
started = true
local services = KnitServer.Services
return Promise.new(function(resolve)
-- Bind remotes:
for _, service in pairs(services) do
for k, v in pairs(service.Client) do
if type(v) == "function" then
KnitServer.BindRemoteFunction(service, k, v)
elseif RemoteSignal.Is(v) then
KnitServer.BindRemoteEvent(service, k, v)
elseif RemoteProperty.Is(v) then
KnitServer.BindRemoteProperty(service, k, v)
elseif Signal.Is(v) then
warn(
"Found Signal instead of RemoteSignal (Knit.Util.RemoteSignal). Please change to RemoteSignal. ["
.. service.Name
.. ".Client."
.. k
.. "]"
)
end
end
end
-- Init:
local promisesInitServices = {}
for _, service in pairs(services) do
if type(service.KnitInit) == "function" then
table.insert(
promisesInitServices,
Promise.new(function(r)
service:KnitInit()
r()
end)
)
end
end
resolve(Promise.All(promisesInitServices))
end):Then(function()
-- Start:
for _, service in pairs(services) do
if type(service.KnitStart) == "function" then
task.spawn(service.KnitStart, service)
end
end
startedComplete = true
onStartedComplete:Fire()
task.defer(function()
onStartedComplete:Destroy()
end)
-- Expose service remotes to everyone:
knitRepServiceFolder.Parent = script.Parent
end)
end
function KnitServer.OnStart()
if startedComplete then
return Promise.Resolve()
else
return Promise.FromEvent(onStartedComplete.Event)
end
end
return KnitServer
|
local a=function(a,I)local X=a:FindFirstChild(I)while X==nil do a.ChildAdded:wait()X=a:FindFirstChild(I)if X then break end end return X end local I={neckC1=nil,rshoC0=nil;lshoC0=nil,rhipC0=nil,lhipC0=nil}local X=function(X,u)local M=a(u,"\084\111\114\115\111")local U=a(M,"\078\101\099\107")local w=a(M,"\082\105\103\104\116 \083\104\111\117\108\100\101\114")local v=a(M,"\076\101\102\116 \083\104\111\117\108\100\101\114")local r=a(M,"\082\105\103\104\116 \072\105\112")local N=a(M,"\076\101\102\116 \072\105\112")local Y=script.Parent.Configuration local H=Y["\072\101\097\100 \065\110\103\108\101"].Value local m=Y["\076\101\103\115 \065\110\103\108\101"].Value local J=Y["\065\114\109\115 \065\110\103\108\101"].Value local O=Y["\083\105\116\116\105\110\103 \065\110\103\108\101"].Value local o=Y["\083\105\116\116\105\110\103 \080\111\115\105\116\105\111\110"].Value X.C1=X.C1*CFrame.fromEulerAnglesXYZ(math.rad(O+90),0,0)X.C0=CFrame.new(o)I.neckC1=U.C1 I.rshoC0=w.C0 I.lshoC0=v.C0 I.rhipC0=r.C0 I.lhipC0=N.C0 U.C1=U.C1*CFrame.fromEulerAnglesXYZ(math.rad(H),0,0)w.C0=w.C0*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(J))v.C0=v.C0*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(-J))r.C0=r.C0*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(m))N.C0=N.C0*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(-m))end local u=function(X,u)local M=a(u,"\084\111\114\115\111")local U=a(M,"\078\101\099\107")local w=a(M,"\082\105\103\104\116 \083\104\111\117\108\100\101\114")local v=a(M,"\076\101\102\116 \083\104\111\117\108\100\101\114")local r=a(M,"\082\105\103\104\116 \072\105\112")local N=a(M,"\076\101\102\116 \072\105\112")U.C1=I.neckC1 or CFrame.new()w.C0=I.rshoC0 or CFrame.new()v.C0=I.lshoC0 or CFrame.new()r.C0=I.rhipC0 or CFrame.new()N.C0=I.lhipC0 or CFrame.new()X:Destroy()end script.Parent.ChildAdded:connect(function(a)if a:IsA("\087\101\108\100")then local I=nil if a.Part1~=nil and(a.Part1.Parent~=nil and a.Part1.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")~=nil)then I=a.Part1.Parent else return end X(a,I)end end)script.Parent.ChildRemoved:connect(function(a)if a:IsA("\087\101\108\100")then local I=nil if a.Part1~=nil and(a.Part1.Parent~=nil and a.Part1.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")~=nil)then I=a.Part1.Parent else return end u(a,I)end end) | --Don't modify this script unless you really know what you're doing.
local WaitFor = function(parent, child_name)
local found = parent:FindFirstChild(child_name)
while found == nil do
parent.ChildAdded:wait()
found = parent:FindFirstChild(child_name)
if found then
break
end
end
return found
end
local last = { neckC1 = nil, rshoC0 = nil, lshoC0 = nil, rhipC0 = nil, lhipC0 = nil }
local ApplyModifications = function(weld, char)
local torso = WaitFor(char, "Torso")
local neck = WaitFor(torso, "Neck")
local rsho = WaitFor(torso, "Right Shoulder")
local lsho = WaitFor(torso, "Left Shoulder")
local rhip = WaitFor(torso, "Right Hip")
local lhip = WaitFor(torso, "Left Hip")
local config = script.Parent.Configuration
local head_ang = config["Head Angle"].Value
local legs_ang = config["Legs Angle"].Value
local arms_ang = config["Arms Angle"].Value
local sit_ang = config["Sitting Angle"].Value
local sit_pos = config["Sitting Position"].Value
--First adjust sitting position and angle
--Add 90 to the angle because that's what most people will be expecting.
weld.C1 = weld.C1 * CFrame.fromEulerAnglesXYZ(math.rad(sit_ang + 90), 0, 0)
weld.C0 = CFrame.new(sit_pos)
last.neckC1 = neck.C1
last.rshoC0 = rsho.C0
last.lshoC0 = lsho.C0
last.rhipC0 = rhip.C0
last.lhipC0 = lhip.C0
--Now adjust the neck angle.
neck.C1 = neck.C1 * CFrame.fromEulerAnglesXYZ(math.rad(head_ang), 0, 0)
--Now adjust the arms angle.
rsho.C0 = rsho.C0 * CFrame.fromEulerAnglesXYZ(math.rad(0), math.rad(0), math.rad(arms_ang))
lsho.C0 = lsho.C0 * CFrame.fromEulerAnglesXYZ(math.rad(0), math.rad(0), math.rad(-arms_ang))
--Now the legs
rhip.C0 = rhip.C0 * CFrame.fromEulerAnglesXYZ(math.rad(0), math.rad(0), math.rad(legs_ang))
lhip.C0 = lhip.C0 * CFrame.fromEulerAnglesXYZ(math.rad(0), math.rad(0), math.rad(-legs_ang))
end
local RevertModifications = function(weld, char)
--Any modifications done in ApplyModifications have to be reverted here if they
--change any welds - otherwise people will wonder why their head is pointing the wrong way.
local torso = WaitFor(char, "Torso")
local neck = WaitFor(torso, "Neck")
local rsho = WaitFor(torso, "Right Shoulder")
local lsho = WaitFor(torso, "Left Shoulder")
local rhip = WaitFor(torso, "Right Hip")
local lhip = WaitFor(torso, "Left Hip")
--Now adjust the neck angle.
neck.C1 = last.neckC1 or CFrame.new()
rsho.C0 = last.rshoC0 or CFrame.new()
lsho.C0 = last.lshoC0 or CFrame.new()
rhip.C0 = last.rhipC0 or CFrame.new()
lhip.C0 = last.lhipC0 or CFrame.new()
weld:Destroy()
end
script.Parent.ChildAdded:connect(function(c)
if c:IsA("Weld") then
local character = nil
if c.Part1 ~= nil and c.Part1.Parent ~= nil and c.Part1.Parent:FindFirstChild("Humanoid") ~= nil then
character = c.Part1.Parent
else
return
end
ApplyModifications(c, character)
end
end)
script.Parent.ChildRemoved:connect(function(c)
if c:IsA("Weld") then
local character = nil
if c.Part1 ~= nil and c.Part1.Parent ~= nil and c.Part1.Parent:FindFirstChild("Humanoid") ~= nil then
character = c.Part1.Parent
else
return
end
RevertModifications(c, character)
end
end)
|
function updatechar()for a,I in pairs(character:GetChildren())do if CanViewBody then if I.Name=="\072\101\097\100"then I.LocalTransparencyModifier=1 I.CanCollide=false I.face.LocalTransparencyModifier=1 end else if I:IsA("\080\097\114\116")or I:IsA("\085\110\105\111\110\079\112\101\114\097\116\105\111\110")or I:IsA("\077\101\115\104\080\097\114\116")then I.LocalTransparencyModifier=1 I.CanCollide=false end end if I:IsA("\065\099\099\101\115\115\111\114\121")then(I:FindFirstChild("\072\097\110\100\108\101")).LocalTransparencyModifier=1;(I:FindFirstChild("\072\097\110\100\108\101")).CanCollide=false end if I:IsA("\072\097\116")then(I:FindFirstChild("\072\097\110\100\108\101")).LocalTransparencyModifier=1;(I:FindFirstChild("\072\097\110\100\108\101")).CanCollide=false end end end | ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
function updatechar()
for _, v in pairs(character:GetChildren()) do
if CanViewBody then
if v.Name == "Head" then
v.LocalTransparencyModifier = 1
v.CanCollide = false
v.face.LocalTransparencyModifier = 1
end
else
if v:IsA("Part") or v:IsA("UnionOperation") or v:IsA("MeshPart") then
v.LocalTransparencyModifier = 1
v.CanCollide = false
end
end
if v:IsA("Accessory") then
v:FindFirstChild("Handle").LocalTransparencyModifier = 1
v:FindFirstChild("Handle").CanCollide = false
end
if v:IsA("Hat") then
v:FindFirstChild("Handle").LocalTransparencyModifier = 1
v:FindFirstChild("Handle").CanCollide = false
end
end
end
|
module.ChatWindowBackgroundFadeOutTime=3.5 module.ChatWindowTextFadeOutTime=30 module.ChatDefaultFadeDuration=.8 module.ChatShouldFadeInFromNewInformation=false module.ChatAnimationFPS=20.0 | ---[[ Fade Out and In Settings ]]
module.ChatWindowBackgroundFadeOutTime = 3.5 --Chat background will fade out after this many seconds.
module.ChatWindowTextFadeOutTime = 30 --Chat text will fade out after this many seconds.
module.ChatDefaultFadeDuration = 0.8
module.ChatShouldFadeInFromNewInformation = false
module.ChatAnimationFPS = 20.0
|
function waitForChild(g,N)local f=g:findFirstChild(N)if f then return f end while true do f=g.ChildAdded:wait()if f.Name==N then return f end end end | --This local script will run only for the player whos character it is in. It's changes to the sounds will replicate as they are changes to the character.
-- util
function waitForChild(parent, childName)
local child = parent:findFirstChild(childName)
if child then
return child
end
while true do
child = parent.ChildAdded:wait()
if child.Name == childName then
return child
end
end
end
|
function Option.UnwrapOrElse(N,g)if N:IsSome()then return N:Unwrap()else return g()end end | --[=[
@param defaultFn () -> any
@return value: any
If the option holds a value, returns the value. Otherwise, returns the
result of the `defaultFn` function.
]=]
function Option:UnwrapOrElse(defaultFn)
if self:IsSome() then
return self:Unwrap()
else
return defaultFn()
end
end
|
player.CharacterAdded:Connect(function()task.wait(1)if currentSound.IsPlaying then currentSound:Stop()end end) | -- Small bug fix where the sound would start playing after the player joined
player.CharacterAdded:Connect(function()
task.wait(1)
if currentSound.IsPlaying then
currentSound:Stop()
end
end)
|
local g=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local N=game:GetService("\082\117\110\083\101\114\118\105\099\101")local f=game:GetService("\068\097\116\097\083\116\111\114\101\083\101\114\118\105\099\101")local j=game:GetService("\077\097\114\107\101\116\112\108\097\099\101\083\101\114\118\105\099\101")local P=game:GetService("\068\101\098\114\105\115")local r=game:GetService("\080\104\121\115\105\099\115\083\101\114\118\105\099\101")local T=game:GetService("\067\111\108\108\101\099\116\105\111\110\083\101\114\118\105\099\101")local w=game:GetService("\072\116\116\112\083\101\114\118\105\099\101")local z=game:GetService("\083\101\114\118\101\114\083\116\111\114\097\103\101")local h=game:GetService("\083\101\114\118\101\114\083\099\114\105\112\116\083\101\114\118\105\099\101")local c=game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")local v=require(g.Modules.GameUtil)N.Heartbeat:connect(function()local N=g.Constants.MinutesAfterMidnight.Value local f,j=v.GetDayPhase()local P=j.tock*10 g.Constants.MinutesAfterMidnight.Value=math.clamp(N+P,0,1440)if g.Constants.MinutesAfterMidnight.Value>=1440 then g.Constants.MinutesAfterMidnight.Value=0 end end) | -- services
local Rep = game:GetService("ReplicatedStorage")
local Run = game:GetService("RunService")
local DS = game:GetService("DataStoreService")
local MS = game:GetService("MarketplaceService")
local Debris = game:GetService("Debris")
local Physics = game:GetService("PhysicsService")
local CS = game:GetService("CollectionService")
local HTTP = game:GetService("HttpService")
local SS = game:GetService("ServerStorage")
local SSS = game:GetService("ServerScriptService")
local UIS = game:GetService("UserInputService")
local GU = require(Rep.Modules.GameUtil)
Run.Heartbeat:connect(function()
local minutesAfterMidnight = Rep.Constants.MinutesAfterMidnight.Value
local dayPhase, phaseData = GU.GetDayPhase()
local amount = phaseData.tock * 10
Rep.Constants.MinutesAfterMidnight.Value = math.clamp(minutesAfterMidnight + amount, 0, 1440)
if Rep.Constants.MinutesAfterMidnight.Value >= 1440 then
Rep.Constants.MinutesAfterMidnight.Value = 0
end
end)
|
local g={}local N={}for N=65,90,1 do table.insert(g,N)end for N=97,122,1 do table.insert(g,N)end for N=48,57,1 do table.insert(g,N)end table.insert(g,43)table.insert(g,47)for g,f in ipairs(g)do N[f]=g end local f={ClassName="\066\097\115\101\054\052";__tostring=function(g)return g.ClassName end}f.__index=f local j=bit32.rshift local P=bit32.lshift local r=bit32.band function f.new()return setmetatable({},f)end | --[[
local base64 = Base64.new()
Example:
local myEncodedWord = base64:Encode("Hello")
print(myEncodedWord)
-- outputs: SGVsbG8=
print(base64:Decode(myEncodedWord))
-- outputs: Hello
--]]
local Alphabet = {}
local Indexes = {}
for Index = 65, 90 do
table.insert(Alphabet, Index)
end -- A-Z
for Index = 97, 122 do
table.insert(Alphabet, Index)
end -- a-z
for Index = 48, 57 do
table.insert(Alphabet, Index)
end -- 0-9
table.insert(Alphabet, 43) -- +
table.insert(Alphabet, 47) -- /
for Index, Character in ipairs(Alphabet) do
Indexes[Character] = Index
end
local Base64 = {
ClassName = "Base64",
__tostring = function(self)
return self.ClassName
end,
}
Base64.__index = Base64
local bit32_rshift = bit32.rshift
local bit32_lshift = bit32.lshift
local bit32_band = bit32.band
function Base64.new()
return setmetatable({}, Base64)
end
|
Signal.Fired=function(g)g=string.lower(g)local N=GetEvent(g)return N.Event end | --- On Fire
Signal.Fired = function(eventName)
--- Variables
eventName = string.lower(eventName)
--- Get/create event
local event = GetEvent(eventName)
--
return event.Event
end
|
function Promise.prototype.done(N,g)assert(g==nil or type(g)=="\102\117\110\099\116\105\111\110"or g.__call~=nill,string.format(ERROR_NON_FUNCTION,"\080\114\111\109\105\115\101\058\100\111\110\101"))return N:_finally(debug.traceback(nil,2),g,true)end | --[[
Similar to finally, except rejections are propagated through it.
]]
function Promise.prototype:done(finallyHandler)
assert(
finallyHandler == nil or type(finallyHandler) == "function" or finallyHandler.__call ~= nill,
string.format(ERROR_NON_FUNCTION, "Promise:done")
)
return self:_finally(debug.traceback(nil, 2), finallyHandler, true)
end
|
function BaseCamera.GetCameraToSubjectDistance(g)return g.currentSubjectDistance end | -- Nominal distance, set by dollying in and out with the mouse wheel or equivalent, not measured distance
function BaseCamera:GetCameraToSubjectDistance()
return self.currentSubjectDistance
end
|
local g="\080\117\114\101 \087\104\105\116\101"local N="\080\117\114\101 \087\104\105\116\101"local f="\080\117\114\101 \087\104\105\116\101"local j="\079\069\077 \087\104\105\116\101"local P="\068\097\114\107 \079\114\097\110\103\101"local r="\068\097\114\107 \079\114\097\110\103\101"local T="\080\117\114\101 \087\104\105\116\101"local w="\080\117\114\101 \087\104\105\116\101" | -- COLOR SETTINGS
--[[
COLOR PRESETS:
Headlights
- OEM White
- Xenon
- Pure White
- Brilliant Blue
- Light Green
- Golden Yellow
- Bubu's Purple
- Yellow
Indicators
- Light Orange
- Dark Orange
- Yellow
- Red
For custom color use Color3.fromRGB(R, G, B). You can get your RGB code from the "Color" property.
]]
--
local Low_Beam_Color = "Pure White"
local High_Beam_Color = "Pure White"
local Running_Light_Color = "Pure White"
local Interior_Light_Color = "OEM White"
local Front_Indicator_Color = "Dark Orange"
local Rear_Indicator_Color = "Dark Orange"
local Fog_Light_Color = "Pure White"
local Plate_Light_Color = "Pure White"
|
local g=plr:WaitForChild("\083\101\116\116\105\110\103\115")for N,f in pairs(script:GetChildren())do f.Parent=g end | -- Add everything to settings
local settings = plr:WaitForChild("Settings")
for _, i in pairs(script:GetChildren()) do
i.Parent = settings
end
|
local g=_Tune.Peripherals for N,f in pairs(g)do local j=Instance.new("\073\110\116\086\097\108\117\101",Controls)j.Name=N j.Value=f j.Changed:connect(function()j.Value=math.min(100,math.max(0,j.Value))g[N]=j.Value end)end | --Deadzone Adjust
local _PPH = _Tune.Peripherals
for i, v in pairs(_PPH) do
local a = Instance.new("IntValue", Controls)
a.Name = i
a.Value = v
a.Changed:connect(function()
a.Value = math.min(100, math.max(0, a.Value))
_PPH[i] = a.Value
end)
end
|
FireSelectKey=Enum.KeyCode.V CycleSightKey=Enum.KeyCode.T LaserKey=Enum.KeyCode.G LightKey=Enum.KeyCode.B InteractKey=Enum.KeyCode.E AlternateAimKey=Enum.KeyCode.Z InspectionKey=Enum.KeyCode.H AttachmentKey=Enum.KeyCode.LeftControl | --// KeyBindings
FireSelectKey = Enum.KeyCode.V
CycleSightKey = Enum.KeyCode.T
LaserKey = Enum.KeyCode.G
LightKey = Enum.KeyCode.B
InteractKey = Enum.KeyCode.E
AlternateAimKey = Enum.KeyCode.Z
InspectionKey = Enum.KeyCode.H
AttachmentKey = Enum.KeyCode.LeftControl
|
local function g()local g=MyPlayer.Character if Tool.Enabled and(g and(g:FindFirstChildOfClass("\072\117\109\097\110\111\105\100")and g.Humanoid.Health>0))then Tool.Enabled=false local g=MouseLoc:InvokeClient(MyPlayer)local N=Rocket:Clone()DebrisService:AddItem(N,30)N.BrickColor=MyPlayer.TeamColor local f=(ToolHandle.CFrame*CFrame.new(5,0,0)).p N.CFrame=CFrame.new(f,g)N.Velocity=N.CFrame.lookVector*ROCKET_SPEED N.Parent=workspace N:SetNetworkOwner(nil)wait(RELOAD_TIME)Tool.Enabled=true end end function OnEquipped()MyPlayer=PlayersService:GetPlayerFromCharacter(Tool.Parent)end | -----------------
--| Functions |--
-----------------
local function OnActivated()
local myModel = MyPlayer.Character
if Tool.Enabled and myModel and myModel:FindFirstChildOfClass("Humanoid") and myModel.Humanoid.Health > 0 then
Tool.Enabled = false
local Pos = MouseLoc:InvokeClient(MyPlayer)
-- Create a clone of Rocket and set its color
local rocketClone = Rocket:Clone()
DebrisService:AddItem(rocketClone, 30)
rocketClone.BrickColor = MyPlayer.TeamColor
-- Position the rocket clone and launch!
local spawnPosition = (ToolHandle.CFrame * CFrame.new(5, 0, 0)).p
rocketClone.CFrame = CFrame.new(spawnPosition, Pos) --NOTE: This must be done before assigning Parent
rocketClone.Velocity = rocketClone.CFrame.lookVector * ROCKET_SPEED --NOTE: This should be done before assigning Parent
rocketClone.Parent = workspace
rocketClone:SetNetworkOwner(nil)
wait(RELOAD_TIME)
Tool.Enabled = true
end
end
function OnEquipped()
MyPlayer = PlayersService:GetPlayerFromCharacter(Tool.Parent)
end
|
function CreateArms()local g={}for N=0,1,1 do local f=Instance.new("\077\111\100\101\108")f.Name="\065\114\109\077\111\100\101\108"local j=Instance.new("\080\097\114\116")j.BrickColor=S.FakeArmRealBodyColor and(N==0 and LArm.BrickColor or RArm.BrickColor)or S.FakeArmColor j.Transparency=S.FakeArmTransparency j.Name="\065\114\109"j.CanCollide=false j.Size=VEC3(1,2,1)j.Parent=f local P=Instance.new("\083\112\101\099\105\097\108\077\101\115\104")P.MeshId="\114\098\120\097\115\115\101\116\058\047\047\102\111\110\116\115\047\047\114\105\103\104\116\097\114\109\046\109\101\115\104"P.MeshType=Enum.MeshType.FileMesh P.Scale=VEC3(.65,1,.65)P.Parent=j local r=Instance.new("\080\097\114\116")r.BrickColor=BrickColor.new("\083\097\110\100 \103\114\101\101\110")r.Name="\083\108\101\101\118\101\049"r.CanCollide=false r.Size=VEC3(1,2,1)r.Parent=f local T=Instance.new("\066\108\111\099\107\077\101\115\104")T.Offset=VEC3(0,.66,0)T.Scale=VEC3(.656,.35,.656)T.Parent=r local w=Instance.new("\087\101\108\100")w.Part0=j w.Part1=r w.Parent=j local z=Instance.new("\080\097\114\116")z.BrickColor=BrickColor.new("\083\097\110\100 \103\114\101\101\110")z.Name="\083\108\101\101\118\101\050"z.CanCollide=false z.Size=VEC3(1,2,1)z.Parent=f local h=Instance.new("\066\108\111\099\107\077\101\115\104")h.Offset=VEC3(0,.46,0)h.Scale=VEC3(.75,.1,.75)h.Parent=z local c=Instance.new("\087\101\108\100")c.Part0=j c.Part1=z c.Parent=j local v=Instance.new("\080\097\114\116")v.BrickColor=BrickColor.new("\066\108\097\099\107")v.Name="\071\108\111\118\101\049"v.CanCollide=false v.Size=VEC3(1,2,1)v.Parent=f local o=Instance.new("\066\108\111\099\107\077\101\115\104")o.Offset=VEC3(0,-0.4,0)o.Scale=VEC3(.657,.205,.657)o.Parent=v local n=Instance.new("\087\101\108\100")n.Part0=j n.Part1=v n.Parent=j local q=Instance.new("\080\097\114\116")q.BrickColor=BrickColor.new("\066\108\097\099\107")q.Name="\071\108\111\118\101\050"q.CanCollide=false q.Size=VEC3(1,2,1)q.Parent=f local i=Instance.new("\066\108\111\099\107\077\101\115\104")i.Offset=VEC3(0,-0.335,0)i.Scale=VEC3(.69,.105,.69)i.Parent=q local d=Instance.new("\087\101\108\100")d.Part0=j d.Part1=q d.Parent=j local l=Instance.new("\080\097\114\116")l.BrickColor=BrickColor.new("\066\108\097\099\107")l.Name="\071\108\111\118\101\051"l.CanCollide=false l.Size=VEC3(1,2,1)l.Parent=f local D=Instance.new("\066\108\111\099\107\077\101\115\104")D.Offset=VEC3(.2*(N*2-1),-0.8,0)D.Scale=VEC3(.257,.205,.657)D.Parent=l local X=Instance.new("\087\101\108\100")X.Part0=j X.Part1=l X.Parent=j table.insert(g,{Model=f;ArmPart=j})end return g end | --------------------[ ARM CREATION FUNCTION ]-----------------------------------------
function CreateArms()
local Arms = {}
for i = 0, 1 do
local ArmModel = Instance.new("Model")
ArmModel.Name = "ArmModel"
local Arm = Instance.new("Part")
Arm.BrickColor = (S.FakeArmRealBodyColor and (i == 0 and LArm.BrickColor or RArm.BrickColor) or S.FakeArmColor)
Arm.Transparency = S.FakeArmTransparency
Arm.Name = "Arm"
Arm.CanCollide = false
Arm.Size = VEC3(1, 2, 1)
Arm.Parent = ArmModel
local ArmMesh = Instance.new("SpecialMesh")
ArmMesh.MeshId = "rbxasset://fonts//rightarm.mesh"
ArmMesh.MeshType = Enum.MeshType.FileMesh
ArmMesh.Scale = VEC3(0.65, 1, 0.65)
ArmMesh.Parent = Arm
local Sleeve1 = Instance.new("Part")
Sleeve1.BrickColor = BrickColor.new("Sand green")
Sleeve1.Name = "Sleeve1"
Sleeve1.CanCollide = false
Sleeve1.Size = VEC3(1, 2, 1)
Sleeve1.Parent = ArmModel
local Sleeve1Mesh = Instance.new("BlockMesh")
Sleeve1Mesh.Offset = VEC3(0, 0.66, 0)
Sleeve1Mesh.Scale = VEC3(0.656, 0.35, 0.656)
Sleeve1Mesh.Parent = Sleeve1
local Sleeve1Weld = Instance.new("Weld")
Sleeve1Weld.Part0 = Arm
Sleeve1Weld.Part1 = Sleeve1
Sleeve1Weld.Parent = Arm
local Sleeve2 = Instance.new("Part")
Sleeve2.BrickColor = BrickColor.new("Sand green")
Sleeve2.Name = "Sleeve2"
Sleeve2.CanCollide = false
Sleeve2.Size = VEC3(1, 2, 1)
Sleeve2.Parent = ArmModel
local Sleeve2Mesh = Instance.new("BlockMesh")
Sleeve2Mesh.Offset = VEC3(0, 0.46, 0)
Sleeve2Mesh.Scale = VEC3(0.75, 0.1, 0.75)
Sleeve2Mesh.Parent = Sleeve2
local Sleeve2Weld = Instance.new("Weld")
Sleeve2Weld.Part0 = Arm
Sleeve2Weld.Part1 = Sleeve2
Sleeve2Weld.Parent = Arm
local Glove1 = Instance.new("Part")
Glove1.BrickColor = BrickColor.new("Black")
Glove1.Name = "Glove1"
Glove1.CanCollide = false
Glove1.Size = VEC3(1, 2, 1)
Glove1.Parent = ArmModel
local Glove1Mesh = Instance.new("BlockMesh")
Glove1Mesh.Offset = VEC3(0, -0.4, 0)
Glove1Mesh.Scale = VEC3(0.657, 0.205, 0.657)
Glove1Mesh.Parent = Glove1
local Glove1Weld = Instance.new("Weld")
Glove1Weld.Part0 = Arm
Glove1Weld.Part1 = Glove1
Glove1Weld.Parent = Arm
local Glove2 = Instance.new("Part")
Glove2.BrickColor = BrickColor.new("Black")
Glove2.Name = "Glove2"
Glove2.CanCollide = false
Glove2.Size = VEC3(1, 2, 1)
Glove2.Parent = ArmModel
local Glove2Mesh = Instance.new("BlockMesh")
Glove2Mesh.Offset = VEC3(0, -0.335, 0)
Glove2Mesh.Scale = VEC3(0.69, 0.105, 0.69)
Glove2Mesh.Parent = Glove2
local Glove2Weld = Instance.new("Weld")
Glove2Weld.Part0 = Arm
Glove2Weld.Part1 = Glove2
Glove2Weld.Parent = Arm
local Glove3 = Instance.new("Part")
Glove3.BrickColor = BrickColor.new("Black")
Glove3.Name = "Glove3"
Glove3.CanCollide = false
Glove3.Size = VEC3(1, 2, 1)
Glove3.Parent = ArmModel
local Glove3Mesh = Instance.new("BlockMesh")
Glove3Mesh.Offset = VEC3(0.2 * ((i * 2) - 1), -0.8, 0)
Glove3Mesh.Scale = VEC3(0.257, 0.205, 0.657)
Glove3Mesh.Parent = Glove3
local Glove3Weld = Instance.new("Weld")
Glove3Weld.Part0 = Arm
Glove3Weld.Part1 = Glove3
Glove3Weld.Parent = Arm
table.insert(Arms, { Model = ArmModel, ArmPart = Arm })
end
return Arms
end
|
local function g(g)local N={}for f,j in ipairs(g)do local P=visualWaypoint:Clone()P.Position=j.Position P.Parent=workspace P.Color=j==g[#g]and Color3.fromRGB(0,255,0)or j.Action==Enum.PathWaypointAction.Jump and Color3.fromRGB(255,0,0)or Color3.fromRGB(255,139,0)table.insert(N,P)end return N end | --Create visual waypoints
local function createVisualWaypoints(waypoints)
local visualWaypoints = {}
for _, waypoint in ipairs(waypoints) do
local visualWaypointClone = visualWaypoint:Clone()
visualWaypointClone.Position = waypoint.Position
visualWaypointClone.Parent = workspace
visualWaypointClone.Color = (waypoint == waypoints[#waypoints] and Color3.fromRGB(0, 255, 0))
or (waypoint.Action == Enum.PathWaypointAction.Jump and Color3.fromRGB(255, 0, 0))
or Color3.fromRGB(255, 139, 0)
table.insert(visualWaypoints, visualWaypointClone)
end
return visualWaypoints
end
|
local g=Game:GetService("\080\108\097\121\101\114\115")local N=Game:GetService("\068\101\098\114\105\115")local f=script.Parent local j=f:WaitForChild("\072\097\110\100\108\101")local P=j:WaitForChild("\070\105\114\101")local r=j:WaitForChild("\082\101\108\111\097\100")local T=script:WaitForChild("\072\105\116\070\097\100\101")local w=j:WaitForChild("\080\111\105\110\116\076\105\103\104\116")local z=nil local h=nil local c=nil local v=nil | -----------------
--| Variables |--
-----------------
local PlayersService = Game:GetService("Players")
local DebrisService = Game:GetService("Debris")
local Tool = script.Parent
local Handle = Tool:WaitForChild("Handle")
local FireSound = Handle:WaitForChild("Fire")
local ReloadSound = Handle:WaitForChild("Reload")
local HitFadeSound = script:WaitForChild("HitFade")
local PointLight = Handle:WaitForChild("PointLight")
local Character = nil
local Humanoid = nil
local Player = nil
local BaseShot = nil
|
function CameraUtils.Clamp(g,N,f)return math.min(math.max(f,g),N)end | -- Note, arguments do not match the new math.clamp
-- Eventually we will replace these calls with math.clamp, but right now
-- this is safer as math.clamp is not tolerant of min>max
function CameraUtils.Clamp(low, high, val)
return math.min(math.max(val, low), high)
end
|
Tune.Clutch=false Tune.TransModes={"\065\117\116\111"}Tune.ClutchType="\065\117\116\111"Tune.ClutchMode="\083\112\101\101\100"Tune.Stall=true Tune.ClutchEngage=25 Tune.TQLock=false Tune.RPMEngage=5300 Tune.SpeedEngage=15 Tune.ClutchRPMMult=1.0 Tune.QuickShifter=true Tune.QuickShiftTime=.25 Tune.AutoShiftMode="\083\112\101\101\100"Tune.AutoShiftType="\068\067\084"Tune.AutoUpThresh=200 Tune.AutoDownThresh=1400 Tune.ShiftThrot=100 Tune.ShiftUpTime=.25 Tune.ShiftDnTime=.125 Tune.FinalDrive=1.875 Tune.NeutralRev=true Tune.Ratios={0,6.4,5.3333333333333,4.7142857142857,4.0,3.7777777777778,3.3}Tune.Limiter=true Tune.SpeedLimit=121 | --[[Transmission]]
--
Tune.Clutch = false -- Implements a realistic clutch.
Tune.TransModes = { "Auto" } --[[
[Modes]
"Manual" ; Traditional clutch operated manual transmission
"DCT" ; Dual clutch transmission, where clutch is operated automatically
"Auto" ; Automatic transmission that shifts for you
>Include within brackets
eg: {"Manual"} or {"DCT", "Manual"}
>First mode is default mode ]]
--[[Transmission]]
Tune.ClutchType = "Auto" --[[
[Types]
"Clutch" : Standard clutch, recommended
"TorqueConverter" : Torque converter, keeps RPM up
"CVT" : CVT, found in scooters
]]
Tune.ClutchMode = "Speed" --[[
[Modes]
"Speed" : Speed controls clutch engagement
"RPM" : Speed and RPM control clutch engagement ]]
--Transmission Settings
Tune.Stall = true -- Stalling, enables the bike to stall. An ignition plugin would be necessary. Disables if Tune.Clutch is false.
Tune.ClutchEngage = 25 -- How fast engagement is (0 = instant, 99 = super slow)
--Torque Converter:
Tune.TQLock = false -- Torque converter starts locking at a certain RPM (see below if set to true)
--Torque Converter and CVT:
Tune.RPMEngage = 5300 -- Keeps RPMs to this level until passed
--Clutch:
Tune.SpeedEngage = 15 -- Speed the clutch fully engages at (Based on SPS)
--Clutch: "RPM" mode
Tune.ClutchRPMMult = 1.0 -- Clutch RPM multiplier, recommended to leave at 1.0
--Manual: Quick Shifter
Tune.QuickShifter = true -- To quickshift, cut off the throttle to upshift, and apply throttle to downshift, all without clutch.
Tune.QuickShiftTime = 0.25 -- Determines how much time you have to quick shift up or down before you need to use the clutch.
--Automatic Settings
Tune.AutoShiftMode = "Speed" --[[
[Modes]
"Speed" : Shifts based on wheel speed
"RPM" : Shifts based on RPM ]]
Tune.AutoShiftType = "DCT" --[[
[Types]
"Rev" : Clutch engages fully once RPM reached
"DCT" : Clutch engages after a set time has passed ]]
Tune.AutoUpThresh = 200 -- Automatic upshift point (relative to peak RPM, positive = Over-rev)
Tune.AutoDownThresh = 1400 -- Automatic downshift point (relative to peak RPM, positive = Under-rev)
--Automatic: Revmatching
Tune.ShiftThrot = 100 -- Throttle level when shifting down to revmatch, 0 - 100%
--Automatic: DCT
Tune.ShiftUpTime = 0.25 -- Time required to shift into next gear, from a lower gear to a higher one.
Tune.ShiftDnTime = 0.125 -- Time required to shift into next gear, from a higher gear to a lower one.
Tune.FinalDrive = (30 / 16) * 1 -- (Final * Primary) -- Gearing determines top speed and wheel torque
-- for the final is recommended to divide the size of the rear sprocket to the one of the front sprocket
-- and multiply it to the primary drive ratio, if data is missing, you can also just use a single number
Tune.NeutralRev = true -- Enables you to back up manually in neutral
Tune.Ratios = { -- Higher ratio = more torque, Lower ratio = higher top speed
--[[Neutral]]
0, -- Ratios can also be deleted
--[[ 1 ]]
32 / 5, -- Neutral and 1st gear are required
--[[ 2 ]]
32 / 6,
--[[ 3 ]]
33 / 7,
--[[ 4 ]]
32 / 8,
--[[ 5 ]]
34 / 9,
--[[ 6 ]]
33 / 10,
}
Tune.Limiter = true -- Enables a speed limiter
Tune.SpeedLimit = 121 -- At what speed (SPS) the limiter engages
|
XR15RightLegLeftLean=0 YR15RightLegLeftLean=-0.2 ZR15RightLegLeftLean=.3 R15RightKneeLeftLean=-0.3 XR15RightArmLeftLean=.5 YR15RightArmLeftLean=-0.3 ZR15RightArmLeftLean=.2 R15RightElbowLeftLean=.2 XR15LeftLegLeftLean=.5 YR15LeftLegLeftLean=.35 ZR15LeftLegLeftLean=.55 R15LeftKneeLeftLean=-0.1 XR15LeftArmLeftLean=-0.5 YR15LeftArmLeftLean=-0.5 ZR15LeftArmLeftLean=-0.72 R15LeftElbowLeftLean=-1.2 XR15LowerTorsoLeftLean=.3 YR15LowerTorsoLeftLean=-0.3 ZR15LowerTorsoLeftLean=.1 ZR15UpperTorsoLeftLean=.2 | --Left lean
XR15RightLegLeftLean = 0
YR15RightLegLeftLean = -0.2
ZR15RightLegLeftLean = 0.3
R15RightKneeLeftLean = -0.3
XR15RightArmLeftLean = 0.5
YR15RightArmLeftLean = -0.3
ZR15RightArmLeftLean = 0.2
R15RightElbowLeftLean = 0.2
XR15LeftLegLeftLean = 0.5
YR15LeftLegLeftLean = 0.35
ZR15LeftLegLeftLean = 0.55
R15LeftKneeLeftLean = -0.1
XR15LeftArmLeftLean = -0.5
YR15LeftArmLeftLean = -0.5
ZR15LeftArmLeftLean = -0.72
R15LeftElbowLeftLean = -1.2
XR15LowerTorsoLeftLean = 0.3
YR15LowerTorsoLeftLean = -0.3
ZR15LowerTorsoLeftLean = 0.1
ZR15UpperTorsoLeftLean = 0.2
|
local g=ServerScriptService:FindFirstChild("\077\111\100\117\108\101\083\099\114\105\112\116\115")local N=g:FindFirstChild("\082\097\099\101\077\111\100\117\108\101\115")local f=ReplicatedStorage:FindFirstChild("\077\111\100\117\108\101\083\099\114\105\112\116\115")local j=require(N:FindFirstChild("\071\097\109\101\083\101\116\116\105\110\103\115"))local P=require(N:FindFirstChild("\076\101\097\100\101\114\098\111\097\114\100\077\097\110\097\103\101\114"))local r=require(f:FindFirstChild("\082\097\099\101\077\097\110\097\103\101\114"))local T=require(f:FindFirstChild("\080\108\097\121\101\114\067\111\110\118\101\114\116\101\114")) | -- Module Scripts
local ModuleScripts = ServerScriptService:FindFirstChild("ModuleScripts")
local RaceModules = ModuleScripts:FindFirstChild("RaceModules")
local ReplicatedModuleScripts = ReplicatedStorage:FindFirstChild("ModuleScripts")
local GameSettings = require(RaceModules:FindFirstChild("GameSettings"))
local LeaderboardManager = require(RaceModules:FindFirstChild("LeaderboardManager"))
local RaceManager = require(ReplicatedModuleScripts:FindFirstChild("RaceManager"))
local PlayerConverter = require(ReplicatedModuleScripts:FindFirstChild("PlayerConverter"))
|
local g=nil local N=nil local f=nil local j=nil local P=nil local r=false local T=false local w=game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101") | --// Delcarables
local newRope = nil
local newDir = nil
local new = nil
local newAtt0 = nil
local newAtt1 = nil
local isHeld = false
local active = false
local TS = game:GetService("TweenService")
|
local g="\078\111\110\101"local N=0 local f=0 local j=.3 local P=.1 local r=.3 local T=.75 | -- declarations
local toolAnim = "None"
local toolAnimTime = 0
local jumpAnimTime = 0
local jumpAnimDuration = 0.3
local toolTransitionTime = 0.1
local fallTransitionTime = 0.3
local jumpMaxLimbVelocity = 0.75
|
local g=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local N=game:GetService("\077\097\114\107\101\116\112\108\097\099\101\083\101\114\118\105\099\101")local f=game:GetService("\080\108\097\121\101\114\115")local j=g.AvatarEditor local P=require(j.Shared.Util.Spring)local r=require(j.Shared.Util.Maid)local T=require(j.Shared.Util.Promise)local w=require(j.Client.GuiLib.LazyLoader)local z=require(j.Shared.GetProductInfo)local h=require(j.Client.Theme)local c=f.LocalPlayer local v={}v.__index=v function v.new(g)local N=setmetatable({},v)N.Frame=g N.PurchaseFrame=N.Frame.Frame N.CreateFrame=N.Frame.CreateOutfit N.ConfirmFrame=N.Frame.Confirm N.Maid=r.new()N.Listeners=r.new()for g,f in ipairs(g:GetChildren())do if not f:IsA("\070\114\097\109\101")then continue end N.Maid:GiveTask(h:Bind(f,"\066\097\099\107\103\114\111\117\110\100\067\111\108\111\114\051","\080\114\105\109\097\114\121"))N.Maid:GiveTask(h:Bind(f.Buttons.Button1,"\066\097\099\107\103\114\111\117\110\100\067\111\108\111\114\051","\067\097\110\099\101\108"))N.Maid:GiveTask(h:Bind(f.Buttons.Button1,"\084\101\120\116\067\111\108\111\114\051","\084\101\120\116"))N.Maid:GiveTask(h:Bind(f.Buttons.Button2,"\066\097\099\107\103\114\111\117\110\100\067\111\108\111\114\051","\067\111\110\102\105\114\109"))N.Maid:GiveTask(h:Bind(f.Buttons.Button2,"\084\101\120\116\067\111\108\111\114\051","\084\101\120\116"))end N.Maid:GiveTask(h:Bind(N.ConfirmFrame.Body.MessageLabel,"\084\101\120\116\067\111\108\111\114\051","\084\101\120\116"))N.Maid:GiveTask(h:Bind(N.ConfirmFrame.Body.TextLabel,"\084\101\120\116\067\111\108\111\114\051","\084\101\120\116"))N.Maid:GiveTask(h:Bind(N.ConfirmFrame.Body.TextLabel.Line,"\066\097\099\107\103\114\111\117\110\100\067\111\108\111\114\051","\084\101\120\116"))N.Maid:GiveTask(h:Bind(N.CreateFrame.Body.TextLabel,"\084\101\120\116\067\111\108\111\114\051","\084\101\120\116"))N.Maid:GiveTask(h:Bind(N.CreateFrame.Body.TextLabel.Line,"\066\097\099\107\103\114\111\117\110\100\067\111\108\111\114\051","\084\101\120\116"))N.Maid:GiveTask(h:Bind(N.CreateFrame.Body.Info.Search,"\066\097\099\107\103\114\111\117\110\100\067\111\108\111\114\051","\084\097\098\066\117\116\116\111\110"))N.Maid:GiveTask(h:Bind(N.CreateFrame.Body.Info.Search.TextBox,"\080\108\097\099\101\104\111\108\100\101\114\067\111\108\111\114\051","\080\108\097\099\101\104\111\108\100\101\114\084\101\120\116"))N.Maid:GiveTask(h:Bind(N.CreateFrame.Body.Info.Search.TextBox,"\084\101\120\116\067\111\108\111\114\051","\084\101\120\116"))N.Maid:GiveTask(h:Bind(N.PurchaseFrame.Body.ProductInfo.ItemPreviewImage.ItemPreviewImageContainer,"\066\097\099\107\103\114\111\117\110\100\067\111\108\111\114\051","\084\101\120\116"))N.Maid:GiveTask(h:Bind(N.PurchaseFrame.Body.ProductInfo.ProductDescription.ProductDescriptionText,"\084\101\120\116\067\111\108\111\114\051","\084\101\120\116"))N.Maid:GiveTask(h:Bind(N.PurchaseFrame.Body.AdditionalDetails,"\084\101\120\116\067\111\108\111\114\051","\084\101\120\116"))N.TweenSpring=P.new(1)N.TweenSpring.Damper=1 N.TweenSpring.Speed=20 for g,N in ipairs(g:GetChildren())do if N:IsA("\070\114\097\109\101")then N.Visible=false end end return N end function v.OnRenderStep(N,g)local f=N.Frame local j=N.TweenSpring j:TimeSkip(g)local P=j.Position f.BackgroundTransparency=.4+P*.6 f.Visible=f.BackgroundTransparency<.98 end function v.PromptPurchase(f,g)local j=f.Listeners local P=f.PurchaseFrame local r=P.Buttons local T=P.Body.ProductInfo local w=T.ProductDescription.ProductDescriptionText local h=T.ItemPreviewImage.ItemPreviewImageContainer.ItemImage f:_setup(P)w.Text=""h.Image=""r.Button2.Text="\063\063\063"local v=z(g);(v:andThen(function(f)w.Text=f.Name h.Image="\114\098\120\116\104\117\109\098\058\047\047\116\121\112\101\061\065\115\115\101\116\038\105\100\061"..(f.AssetId.."\038\119\061\049\053\048\038\104\061\049\053\048")if f.IsPublicDomain then r.Button2.Text="\070\114\101\101"elseif f.IsForSale then r.Button2.Text=f.PriceInRobux.." \082\111\098\117\120"else r.Button2.Text="\079\102\102\115\097\108\101"end j:GiveTask(r.Button2.Activated:Connect(function(f)N:PromptPurchase(c,g)j:DoCleaning()end))end)):catch(warn)j:GiveTask(function()v:cancel()w.Text=""h.Image=""r.Button2.Text="\063\063\063"end)end function v.PromptCostume(N,g)local f=N.Listeners local j=N.CreateFrame local P=j.Buttons local r=j.Body.Info.Search.TextBox N:_setup(j)j.Body.Info.TextLabel.Visible=false local T=w.Classes.TextMask.new(r)f:GiveTask(T)T:SetMaskType("\065\108\112\104\097\110\117\109\098\101\114\105\099")T:SetMaxLength(20)local function z()if r.Text~=""then g(r.Text)f:DoCleaning()end end f:GiveTask(T.Frame.FocusLost:Connect(function(g,N)if not g then return end z()end))f:GiveTask(P.Button2.Activated:Connect(function(g)z()end))f:GiveTask(function()r.Text=""end)r:CaptureFocus()end function v.PromptConfirm(f,g,N)local j=f.Listeners local P=f.ConfirmFrame local r=P.Buttons P.Body.TextLabel.Text=g.Title or"\067\111\110\102\105\114\109"P.Body.MessageLabel.Text=g.Text or"\065\114\101 \121\111\117 \115\117\114\101 \121\111\117 \119\097\110\116 \116\111 \100\111 \116\104\105\115 \097\099\116\105\111\110\063"j:GiveTask(r.Button2.Activated:Connect(function(g)N()j:DoCleaning()end))f:_setup(P)end function v._setup(N,g)local f=N.Listeners local j=N.TweenSpring local P=g.Buttons f:GiveTask(P.Button1.Activated:Connect(function(g)f:DoCleaning()end))f:GiveTask(g.Parent.Activated:Connect(function(g)f:DoCleaning()end))f:GiveTask(function()g.Visible=false j.Target=1 end)g.Visible=true j.Target=0 end function v.Destroy(g)g.Maid:DoCleaning()g.Maid=nil g.Listeners:DoCleaning()g.Listeners=nil g.Frame=nil g.PurchaseFrame=nil g.CreateFrame=nil g.ConfirmFrame=nil g.TweenSpring=nil setmetatable(g,nil)end return v | --[[
]]
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Marketplace = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
local AvatarEditor = ReplicatedStorage.AvatarEditor
local Spring = require(AvatarEditor.Shared.Util.Spring)
local Maid = require(AvatarEditor.Shared.Util.Maid)
local Promise = require(AvatarEditor.Shared.Util.Promise)
local GuiLib = require(AvatarEditor.Client.GuiLib.LazyLoader)
local GetProductInfo = require(AvatarEditor.Shared.GetProductInfo)
local Theme = require(AvatarEditor.Client.Theme)
local player = Players.LocalPlayer
local Class = {}
Class.__index = Class
function Class.new(frame)
local self = setmetatable({}, Class)
self.Frame = frame
self.PurchaseFrame = self.Frame.Frame
self.CreateFrame = self.Frame.CreateOutfit
self.ConfirmFrame = self.Frame.Confirm
self.Maid = Maid.new()
self.Listeners = Maid.new()
for i, v in ipairs(frame:GetChildren()) do
if not v:IsA("Frame") then
continue
end
self.Maid:GiveTask(Theme:Bind(v, "BackgroundColor3", "Primary"))
self.Maid:GiveTask(Theme:Bind(v.Buttons.Button1, "BackgroundColor3", "Cancel"))
self.Maid:GiveTask(Theme:Bind(v.Buttons.Button1, "TextColor3", "Text"))
self.Maid:GiveTask(Theme:Bind(v.Buttons.Button2, "BackgroundColor3", "Confirm"))
self.Maid:GiveTask(Theme:Bind(v.Buttons.Button2, "TextColor3", "Text"))
end
self.Maid:GiveTask(Theme:Bind(self.ConfirmFrame.Body.MessageLabel, "TextColor3", "Text"))
self.Maid:GiveTask(Theme:Bind(self.ConfirmFrame.Body.TextLabel, "TextColor3", "Text"))
self.Maid:GiveTask(Theme:Bind(self.ConfirmFrame.Body.TextLabel.Line, "BackgroundColor3", "Text"))
self.Maid:GiveTask(Theme:Bind(self.CreateFrame.Body.TextLabel, "TextColor3", "Text"))
self.Maid:GiveTask(Theme:Bind(self.CreateFrame.Body.TextLabel.Line, "BackgroundColor3", "Text"))
self.Maid:GiveTask(Theme:Bind(self.CreateFrame.Body.Info.Search, "BackgroundColor3", "TabButton"))
self.Maid:GiveTask(Theme:Bind(self.CreateFrame.Body.Info.Search.TextBox, "PlaceholderColor3", "PlaceholderText"))
self.Maid:GiveTask(Theme:Bind(self.CreateFrame.Body.Info.Search.TextBox, "TextColor3", "Text"))
self.Maid:GiveTask(
Theme:Bind(
self.PurchaseFrame.Body.ProductInfo.ItemPreviewImage.ItemPreviewImageContainer,
"BackgroundColor3",
"Text"
)
)
self.Maid:GiveTask(
Theme:Bind(self.PurchaseFrame.Body.ProductInfo.ProductDescription.ProductDescriptionText, "TextColor3", "Text")
)
self.Maid:GiveTask(Theme:Bind(self.PurchaseFrame.Body.AdditionalDetails, "TextColor3", "Text"))
self.TweenSpring = Spring.new(1)
self.TweenSpring.Damper = 1
self.TweenSpring.Speed = 20
for i, v in ipairs(frame:GetChildren()) do
if v:IsA("Frame") then
v.Visible = false
end
end
return self
end
function Class:OnRenderStep(delta)
local frame = self.Frame
local tweenSpring = self.TweenSpring
tweenSpring:TimeSkip(delta)
local pos = tweenSpring.Position
frame.BackgroundTransparency = 0.4 + pos * 0.6
frame.Visible = frame.BackgroundTransparency < 0.98
end
function Class:PromptPurchase(assetId)
local maid = self.Listeners
local frame = self.PurchaseFrame
local overlayButtons = frame.Buttons
local productInfoFrame = frame.Body.ProductInfo
local descriptionLabel = productInfoFrame.ProductDescription.ProductDescriptionText
local previewImage = productInfoFrame.ItemPreviewImage.ItemPreviewImageContainer.ItemImage
self:_setup(frame)
descriptionLabel.Text = ""
previewImage.Image = ""
overlayButtons.Button2.Text = "???"
local productInfoPromise = GetProductInfo(assetId)
productInfoPromise
:andThen(function(productInfo)
descriptionLabel.Text = productInfo.Name
previewImage.Image = "rbxthumb://type=Asset&id=" .. productInfo.AssetId .. "&w=150&h=150"
if productInfo.IsPublicDomain then
overlayButtons.Button2.Text = "Free"
elseif productInfo.IsForSale then
overlayButtons.Button2.Text = productInfo.PriceInRobux .. " Robux"
else
overlayButtons.Button2.Text = "Offsale"
end
maid:GiveTask(overlayButtons.Button2.Activated:Connect(function(inputObject)
Marketplace:PromptPurchase(player, assetId)
maid:DoCleaning()
end))
end)
:catch(warn)
maid:GiveTask(function()
productInfoPromise:cancel()
descriptionLabel.Text = ""
previewImage.Image = ""
overlayButtons.Button2.Text = "???"
end)
end
function Class:PromptCostume(callback)
local maid = self.Listeners
local frame = self.CreateFrame
local overlayButtons = frame.Buttons
local textBox = frame.Body.Info.Search.TextBox
self:_setup(frame)
frame.Body.Info.TextLabel.Visible = false -- TODO error messages?
local mask = GuiLib.Classes.TextMask.new(textBox)
maid:GiveTask(mask)
mask:SetMaskType("Alphanumberic")
mask:SetMaxLength(20)
local function onFocusLost()
if textBox.Text ~= "" then
callback(textBox.Text)
maid:DoCleaning()
end
end
maid:GiveTask(mask.Frame.FocusLost:Connect(function(enterPressed, inputThatCausedFocusLoss)
if not enterPressed then
return
end
onFocusLost()
end))
maid:GiveTask(overlayButtons.Button2.Activated:Connect(function(inputObject)
onFocusLost()
end))
maid:GiveTask(function()
textBox.Text = ""
end)
textBox:CaptureFocus()
end
function Class:PromptConfirm(configTable, callback)
local maid = self.Listeners
local frame = self.ConfirmFrame
local overlayButtons = frame.Buttons
frame.Body.TextLabel.Text = configTable.Title or "Confirm"
frame.Body.MessageLabel.Text = configTable.Text or "Are you sure you want to do this action?"
maid:GiveTask(overlayButtons.Button2.Activated:Connect(function(inputObject)
callback()
maid:DoCleaning()
end))
self:_setup(frame)
end
function Class:_setup(frame)
local maid = self.Listeners
local tweenSpring = self.TweenSpring
local overlayButtons = frame.Buttons
maid:GiveTask(overlayButtons.Button1.Activated:Connect(function(inputObject)
maid:DoCleaning()
end))
maid:GiveTask(frame.Parent.Activated:Connect(function(inputObject)
maid:DoCleaning()
end))
maid:GiveTask(function()
frame.Visible = false
tweenSpring.Target = 1
end)
frame.Visible = true
tweenSpring.Target = 0
end
function Class:Destroy()
self.Maid:DoCleaning()
self.Maid = nil
self.Listeners:DoCleaning()
self.Listeners = nil
self.Frame = nil
self.PurchaseFrame = nil
self.CreateFrame = nil
self.ConfirmFrame = nil
self.TweenSpring = nil
setmetatable(self, nil)
end
return Class
|
local g=5 local N=90 local f=10 local j=1.5 local P=1 | --Wheelie tune
local WheelieD = 5
local WheelieTq = 90
local WheelieP = 10
local WheelieMultiplier = 1.5
local WheelieDivider = 1
|
local g=script.Parent local N=10 local f=g.Handle:WaitForChild("\067\111\105\108\083\111\117\110\100")function MakeSmoke(g,f)smoke=Instance.new("\083\109\111\107\101")smoke.Enabled=g.Velocity.magnitude>N smoke.RiseVelocity=2 smoke.Opacity=.25 smoke.Size=.5 smoke.Parent=g f.Running:connect(function(g)if smoke and smoke~=nil then smoke.Enabled=g>N end end)end g.Equipped:connect(function()local N=g:WaitForChild("\072\097\110\100\108\101")local j=g.Parent:FindFirstChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")local P=g.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")f:Play()P.WalkSpeed=P.WalkSpeed*g.SpeedBoostScript.SpeedMultiplier.Value MakeSmoke(j,P)end)g.Unequipped:connect(function()local N=g.Parent.Parent.Character local f=N.HumanoidRootPart if f:FindFirstChild("\083\109\111\107\101")then f.Smoke:Destroy()end N.Humanoid.WalkSpeed=N.Humanoid.WalkSpeed/g.SpeedBoostScript.SpeedMultiplier.Value end) | -- model by CatLeoYT XD --
local Tool = script.Parent
local speedforsmoke = 10
local CoilSound = Tool.Handle:WaitForChild("CoilSound")
function MakeSmoke(HRP, Human)
smoke = Instance.new("Smoke")
smoke.Enabled = HRP.Velocity.magnitude > speedforsmoke
smoke.RiseVelocity = 2
smoke.Opacity = 0.25
smoke.Size = 0.5
smoke.Parent = HRP
Human.Running:connect(function(speed)
if smoke and smoke ~= nil then
smoke.Enabled = speed > speedforsmoke
end
end)
end
Tool.Equipped:connect(function()
local Handle = Tool:WaitForChild("Handle")
local HRP = Tool.Parent:FindFirstChild("HumanoidRootPart")
local Human = Tool.Parent:FindFirstChild("Humanoid")
CoilSound:Play()
Human.WalkSpeed = Human.WalkSpeed * Tool.SpeedBoostScript.SpeedMultiplier.Value
MakeSmoke(HRP, Human)
end)
Tool.Unequipped:connect(function()
local plrChar = Tool.Parent.Parent.Character
local HRP = plrChar.HumanoidRootPart
if HRP:FindFirstChild("Smoke") then
HRP.Smoke:Destroy()
end
plrChar.Humanoid.WalkSpeed = plrChar.Humanoid.WalkSpeed / Tool.SpeedBoostScript.SpeedMultiplier.Value
end)
|
OverheatSpeed=.2 CoolingEfficiency=.05 RunningTemp=85 Fan=true FanTemp=100 FanTempAlpha=90 FanSpeed=.03 FanVolume=.2 BlowupTemp=130 GUI=true | --Tune
OverheatSpeed = 0.2 --How fast the car will overheat
CoolingEfficiency = 0.05 --How fast the car will cool down
RunningTemp = 85 --In degrees
Fan = true --Cooling fan
FanTemp = 100 --At what temperature the cooling fan will activate
FanTempAlpha = 90 --At what temperature the cooling fan will deactivate
FanSpeed = 0.03 --How fast the car will cool down
FanVolume = 0.2 --Sound volume
BlowupTemp = 130 --At what temperature the engine will blow up
GUI = true --GUI temperature gauge
|
bike.RearSection.RearSwingArmHinge.Size=Vector3.new(_Tune.HingeSize,_Tune.HingeSize,_Tune.HingeSize)bike.RearSection.RearSwingArmHinge.CustomPhysicalProperties=PhysicalProperties.new(_Tune.HingeDensity,0,0,100,100)if _Tune.RBricksVisible or _Tune.Debug then bike.RearSection.RearSwingArmHinge.Transparency=.75 else bike.RearSection.RearSwingArmHinge.Transparency=1 end local g=bike.RearSection.RearSwingArmHinge:Clone()g.Parent=bike.Body g.Name="\083\119\105\110\103\065\114\109\072\105\110\103\101"local N=Instance.new("\065\116\116\097\099\104\109\101\110\116",g)local f=Instance.new("\065\116\116\097\099\104\109\101\110\116",bike.RearSection.RearSwingArmHinge)local j=Instance.new("\072\105\110\103\101\067\111\110\115\116\114\097\105\110\116",g)j.Attachment0=N j.Attachment1=f | --Suspension Hinges
bike.RearSection.RearSwingArmHinge.Size = Vector3.new(_Tune.HingeSize, _Tune.HingeSize, _Tune.HingeSize)
bike.RearSection.RearSwingArmHinge.CustomPhysicalProperties = PhysicalProperties.new(_Tune.HingeDensity, 0, 0, 100, 100)
if _Tune.RBricksVisible or _Tune.Debug then
bike.RearSection.RearSwingArmHinge.Transparency = 0.75
else
bike.RearSection.RearSwingArmHinge.Transparency = 1
end
local rshinge = bike.RearSection.RearSwingArmHinge:Clone()
rshinge.Parent = bike.Body
rshinge.Name = "SwingArmHinge"
local rshingea = Instance.new("Attachment", rshinge)
local rshingeb = Instance.new("Attachment", bike.RearSection.RearSwingArmHinge)
local rshingec = Instance.new("HingeConstraint", rshinge)
rshingec.Attachment0 = rshingea
rshingec.Attachment1 = rshingeb
|
local g=Personagem:WaitForChild("\072\117\109\097\110\111\105\100")local N=Personagem:WaitForChild("\072\101\097\100")local f=Personagem:WaitForChild("\084\111\114\115\111")local j=Personagem:WaitForChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")local P=j:WaitForChild("\082\111\111\116\074\111\105\110\116")local r=f:WaitForChild("\078\101\099\107")local T=f:WaitForChild("\082\105\103\104\116 \083\104\111\117\108\100\101\114")local w=f:WaitForChild("\076\101\102\116 \083\104\111\117\108\100\101\114")local z=f:WaitForChild("\082\105\103\104\116 \072\105\112")local h=f:WaitForChild("\076\101\102\116 \072\105\112")local c={}local v=game:GetService("\068\101\098\114\105\115")local o=ACS_Storage:FindFirstChild("\083\101\114\118\101\114")local n=ACS_Storage:FindFirstChild("\067\108\105\101\110\116")local q={"\073\103\110\111\114\097\098\108\101";"\071\108\097\115\115"}local i={Character,o,Camera,n,q}Camera.CameraType=Enum.CameraType.Custom Camera.CameraSubject=g | --// Char Parts
local Humanoid = Personagem:WaitForChild("Humanoid")
local Head = Personagem:WaitForChild("Head")
local Torso = Personagem:WaitForChild("Torso")
local HumanoidRootPart = Personagem:WaitForChild("HumanoidRootPart")
local RootJoint = HumanoidRootPart:WaitForChild("RootJoint")
local Neck = Torso:WaitForChild("Neck")
local Right_Shoulder = Torso:WaitForChild("Right Shoulder")
local Left_Shoulder = Torso:WaitForChild("Left Shoulder")
local Right_Hip = Torso:WaitForChild("Right Hip")
local Left_Hip = Torso:WaitForChild("Left Hip")
local Connections = {}
local Debris = game:GetService("Debris")
local Ignore_Model = ACS_Storage:FindFirstChild("Server")
local BulletModel = ACS_Storage:FindFirstChild("Client")
local IgnoreList = { "Ignorable", "Glass" }
local Ray_Ignore = { Character, Ignore_Model, Camera, BulletModel, IgnoreList }
Camera.CameraType = Enum.CameraType.Custom
Camera.CameraSubject = Humanoid
|
local g=script.Parent local N=g.FireFly:Clone()g.ChildRemoved:connect(function()if g:FindFirstChild("\067\101\110\116\101\114")then local f=N:Clone()f.Position=g.Center.CenterPart.Position f.Parent=g end end) | -- Spawn a new firefly from the center when one flew too far
local Model = script.Parent
local Fly = Model.FireFly:Clone() -- Clone a fly from the start
Model.ChildRemoved:connect(function() -- When a fly got removed when he flew too far, paste a clone to spawn a new one
if Model:FindFirstChild("Center") then
local newFly = Fly:Clone()
newFly.Position = Model.Center.CenterPart.Position
newFly.Parent = Model
end
end)
|
Tune.Horsepower=140 Tune.IdleRPM=700 Tune.PeakRPM=6980 Tune.Redline=8000 Tune.EqPoint=5500 Tune.PeakSharpness=7.5 Tune.CurveMult=.16 Tune.InclineComp=1.7 Tune.RevAccel=150 Tune.RevDecay=75 Tune.RevBounce=500 Tune.IdleThrottle=3 Tune.ClutchTol=500 | --[[Engine]]
--Torque Curve
Tune.Horsepower = 140 -- [TORQUE CURVE VISUAL]
Tune.IdleRPM = 700 -- https://www.desmos.com/calculator/2uo3hqwdhf
Tune.PeakRPM = 6980 -- Use sliders to manipulate values
Tune.Redline = 8000 -- Copy and paste slider values into the respective tune values
Tune.EqPoint = 5500
Tune.PeakSharpness = 7.5
Tune.CurveMult = 0.16
--Incline Compensation
Tune.InclineComp = 1.7 -- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
--Misc
Tune.RevAccel = 150 -- RPM acceleration when clutch is off
Tune.RevDecay = 75 -- RPM decay when clutch is off
Tune.RevBounce = 500 -- RPM kickback from redline
Tune.IdleThrottle = 3 -- Percent throttle at idle
Tune.ClutchTol = 500 -- Clutch engagement threshold (higher = faster response)
|
function Option.__eq(N,g)if Option.Is(g)then if N:IsSome()and g:IsSome()then return N:Unwrap()==g:Unwrap()elseif N:IsNone()and g:IsNone()then return true end end return false end | --[=[
@return boolean
@param opt Option
Metamethod to check equality between two options. Returns `true` if both
options hold the same value _or_ both options are None.
```lua
local o1 = Option.Some(32)
local o2 = Option.Some(32)
local o3 = Option.Some(64)
local o4 = Option.None
local o5 = Option.None
print(o1 == o2) --> true
print(o1 == o3) --> false
print(o1 == o4) --> false
print(o4 == o5) --> true
```
]=]
function Option:__eq(opt)
if Option.Is(opt) then
if self:IsSome() and opt:IsSome() then
return (self:Unwrap() == opt:Unwrap())
elseif self:IsNone() and opt:IsNone() then
return true
end
end
return false
end
|
function t.numberConstrained(g,N)assert(t.number(g)and t.number(N))local f=t.numberMin(g)local j=t.numberMax(N)return function(g)local N,P=f(g)if not N then return false,P or""end local r,T=j(g)if not r then return false,T or""end return true end end | --[[**
ensures value is a number where min <= value <= max
@param min The minimum to use
@param max The maximum to use
@returns A function that will return true iff the condition is passed
**--]]
function t.numberConstrained(min, max)
assert(t.number(min) and t.number(max))
local minCheck = t.numberMin(min)
local maxCheck = t.numberMax(max)
return function(value)
local minSuccess, minErrMsg = minCheck(value)
if not minSuccess then
return false, minErrMsg or ""
end
local maxSuccess, maxErrMsg = maxCheck(value)
if not maxSuccess then
return false, maxErrMsg or ""
end
return true
end
end
|
Tune.TransModes={"\065\117\116\111"}Tune.AutoShiftMode="\083\112\101\101\100"Tune.AutoUpThresh=-200 Tune.AutoDownThresh=1400 Tune.FinalDrive=4.06 Tune.Ratios={3.7,0,3.53,2.04,1.38,1.03,.81;.64}Tune.FDMult=1.5 | --[[Transmission]]
Tune.TransModes = { "Auto" } --[[
[Modes]
"Auto" : Automatic shifting
"Semi" : Clutchless manual shifting, dual clutch transmission
"Manual" : Manual shifting with clutch
>Include within brackets
eg: {"Semi"} or {"Auto", "Manual"}
>First mode is default mode ]]
--Automatic Settings
Tune.AutoShiftMode = "Speed" --[[
[Modes]
"Speed" : Shifts based on wheel speed
"RPM" : Shifts based on RPM ]]
Tune.AutoUpThresh = -200 --Automatic upshift point (relative to peak RPM, positive = Over-rev)
Tune.AutoDownThresh = 1400 --Automatic downshift point (relative to peak RPM, positive = Under-rev)
--Gear Ratios
Tune.FinalDrive = 4.06 -- Gearing determines top speed and wheel torque
Tune.Ratios = { -- Higher ratio = more torque, Lower ratio = higher top speed
--[[Reverse]]
3.70, -- Copy and paste a ratio to add a gear
--[[Neutral]]
0, -- Ratios can also be deleted
--[[ 1 ]]
3.53, -- Reverse, Neutral, and 1st gear are required
--[[ 2 ]]
2.04,
--[[ 3 ]]
1.38,
--[[ 4 ]]
1.03,
--[[ 5 ]]
0.81,
--[[ 6 ]]
0.64,
}
Tune.FDMult = 1.5 -- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
|
Tune.Peripherals={MSteerWidth=67;MSteerDZone=10,ControlLDZone=5,ControlRDZone=5}Tune.Controls={ToggleTCS=Enum.KeyCode.T,ToggleABS=Enum.KeyCode.Y,ToggleTransMode=Enum.KeyCode.M,ToggleMouseDrive=Enum.KeyCode.R;Throttle=Enum.KeyCode.Up,Brake=Enum.KeyCode.Down,SteerLeft=Enum.KeyCode.Left;SteerRight=Enum.KeyCode.Right;Throttle2=Enum.KeyCode.W,Brake2=Enum.KeyCode.S,SteerLeft2=Enum.KeyCode.A;SteerRight2=Enum.KeyCode.D;ShiftUp=Enum.KeyCode.E,ShiftDown=Enum.KeyCode.Q;Clutch=Enum.KeyCode.LeftShift;PBrake=Enum.KeyCode.P,MouseThrottle=Enum.UserInputType.MouseButton1;MouseBrake=Enum.UserInputType.MouseButton2;MouseClutch=Enum.KeyCode.W;MouseShiftUp=Enum.KeyCode.E,MouseShiftDown=Enum.KeyCode.Q,MousePBrake=Enum.KeyCode.LeftShift;ContlrThrottle=Enum.KeyCode.ButtonR2;ContlrBrake=Enum.KeyCode.ButtonL2,ContlrSteer=Enum.KeyCode.Thumbstick1;ContlrShiftUp=Enum.KeyCode.ButtonY;ContlrShiftDown=Enum.KeyCode.ButtonX,ContlrClutch=Enum.KeyCode.ButtonR1,ContlrPBrake=Enum.KeyCode.ButtonL1;ContlrToggleTMode=Enum.KeyCode.DPadUp;ContlrToggleTCS=Enum.KeyCode.DPadDown;ContlrToggleABS=Enum.KeyCode.DPadRight} | --[[[Default Controls]]
--Peripheral Deadzones
Tune.Peripherals = {
MSteerWidth = 67, -- Mouse steering control width (0 - 100% of screen width)
MSteerDZone = 10, -- Mouse steering deadzone (0 - 100%)
ControlLDZone = 5, -- Controller steering L-deadzone (0 - 100%)
ControlRDZone = 5, -- Controller steering R-deadzone (0 - 100%)
}
--Control Mapping
Tune.Controls = {
--Keyboard Controls
--Mode Toggles
ToggleTCS = Enum.KeyCode.T,
ToggleABS = Enum.KeyCode.Y,
ToggleTransMode = Enum.KeyCode.M,
ToggleMouseDrive = Enum.KeyCode.R,
--Primary Controls
Throttle = Enum.KeyCode.Up,
Brake = Enum.KeyCode.Down,
SteerLeft = Enum.KeyCode.Left,
SteerRight = Enum.KeyCode.Right,
--Secondary Controls
Throttle2 = Enum.KeyCode.W,
Brake2 = Enum.KeyCode.S,
SteerLeft2 = Enum.KeyCode.A,
SteerRight2 = Enum.KeyCode.D,
--Manual Transmission
ShiftUp = Enum.KeyCode.E,
ShiftDown = Enum.KeyCode.Q,
Clutch = Enum.KeyCode.LeftShift,
--Handbrake
PBrake = Enum.KeyCode.P,
--Mouse Controls
MouseThrottle = Enum.UserInputType.MouseButton1,
MouseBrake = Enum.UserInputType.MouseButton2,
MouseClutch = Enum.KeyCode.W,
MouseShiftUp = Enum.KeyCode.E,
MouseShiftDown = Enum.KeyCode.Q,
MousePBrake = Enum.KeyCode.LeftShift,
--Controller Mapping
ContlrThrottle = Enum.KeyCode.ButtonR2,
ContlrBrake = Enum.KeyCode.ButtonL2,
ContlrSteer = Enum.KeyCode.Thumbstick1,
ContlrShiftUp = Enum.KeyCode.ButtonY,
ContlrShiftDown = Enum.KeyCode.ButtonX,
ContlrClutch = Enum.KeyCode.ButtonR1,
ContlrPBrake = Enum.KeyCode.ButtonL1,
ContlrToggleTMode = Enum.KeyCode.DPadUp,
ContlrToggleTCS = Enum.KeyCode.DPadDown,
ContlrToggleABS = Enum.KeyCode.DPadRight,
}
|
function module.CreateRanks(g)(coroutine.wrap(function()local g=main.signals.RetrieveRanksInfo:InvokeServer()local N=g.PermRanks local f=g.Ranks local j=g.Permissions local P={}local r={}for g,N in pairs(f)do local f=N[1]local j=N[2]table.insert(r,1,{f;j,{}})end for g,N in pairs(r)do P[N[1]]=g end for g,f in pairs(j)do if g=="\111\119\110\101\114"and P[8]then local g=r[P[8]]table.insert(g[3],{main.ownerName,"\079\119\110\101\114",(main:GetModule("\099\102")):GetUserImage(main.ownerId)})elseif g=="\115\112\101\099\105\102\105\099\117\115\101\114\115"then for g,N in pairs(f)do if#g>1 then local f=r[P[N]]local j={g,"\083\112\101\099\105\102\105\099 \085\115\101\114";(main:GetModule("\099\102")):GetUserImage((main:GetModule("\099\102")):GetUserId(g))}table.insert(f[3],j)end end for g,N in pairs(N)do if not N.RemoveRank then local g=r[P[N.Rank]]if g then local f={(main:GetModule("\099\102")):GetName(N.UserId),"\080\101\114\109\082\097\110\107";(main:GetModule("\099\102")):GetUserImage(N.UserId);N}table.insert(g[3],f)end end end elseif g=="\103\097\109\101\112\097\115\115\101\115"then for g,N in pairs(f)do if not(main:GetModule("\099\102")):FindValue(main.products,g)then local f=r[P[N.Rank]]if f then local j={N.Name,"\071\097\109\101\112\097\115\115";N.IconImageAssetId;tonumber(g),N.PriceInRobux}table.insert(f[3],j)end end end elseif g=="\097\115\115\101\116\115"then for g,N in pairs(f)do local f=r[P[N.Rank]]if f then local j={N.Name;"\065\115\115\101\116",(main:GetModule("\099\102")):GetAssetImage(g);tonumber(g);N.PriceInRobux}table.insert(f[3],j)end end elseif g=="\103\114\111\117\112\115"then for g,N in pairs(f)do for f,j in pairs(N.Roles)do if j.Rank then local T=r[P[j.Rank]]if T then local j={N.Name..(" \124 "..f),"\071\114\111\117\112",N.EmblemUrl;tonumber(g)}table.insert(T[3],j)end end end end elseif otherPermissions[g]then local N=otherPermissions[g]local f=j[N[1]]if f>0 then local g=r[P[f]]if g then local f={N[2],N[3];string.upper(string.sub(N[1],1,1))}table.insert(g[3],f)end end end end local T=false if main.pdata.Rank>=(main.commandRanks.permrank or 4)then T=true end;(main:GetModule("\099\102")):ClearPage(pages.ranks)local w=0 for g,N in pairs(r)do local f=N[1]local j=N[2]local P=N[3]w=w+1 local r=templates.rankTitle:Clone()r.Name="\076\097\098\101\108"..w r.RankIdFrame.TextLabel.Text=f r.RankName.Text=j r.Visible=true r.Parent=pages.ranks for g,N in pairs(P)do w=w+1 local f=N[1]local P=N[2]local r=N[3]local z=templates.rankItem:Clone()z.Name="\076\097\098\101\108"..w z.ItemTitle.Text=f z.ItemDesc.Text=P if#tostring(r)==1 then z.ItemIcon.Text=r z.ItemIcon.Visible=true z.ItemImage.Visible=false else if tonumber(r)then r="\114\098\120\097\115\115\101\116\105\100\058\047\047"..r end z.ItemImage.Image=tostring(r)end local h=.7 z.Unlock.Visible=false z.ViewMore.Visible=false if P=="\071\097\109\101\112\097\115\115"or P=="\065\115\115\101\116"then local g=N[4]local T=N[5]z.ItemImage.BackgroundTransparency=1 z.Unlock.Visible=true z.Unlock.MouseButton1Down:Connect(function()buyFrame.ProductName.Text=f buyFrame.ProductImage.Image=r buyFrame.PurchaseToUnlock.TextLabel.Text=j buyFrame.InGame.TextLabel.Text=main.gameName buyFrame.MainButton.Price.Text=(T or 0).." "buyFrame.MainButton.ProductId.Value=g buyFrame.MainButton.ProductType.Value=P;(main:GetModule("\099\102")):ShowWarning("\066\117\121\070\114\097\109\101")end)h=.4 elseif P=="\080\101\114\109\082\097\110\107"then local g=N[4]if T then local N=z.ViewMore N.Visible=true N.MouseButton1Down:Connect(function()(main:GetModule("\099\102")):ShowPermRankedUser({f,g.UserId,g.RankedBy})end)end h=.6 else h=.7 end z.ItemTitle.Size=UDim2.new(h,0,z.ItemTitle.Size.Y.Scale,0)z.ItemDesc.Size=UDim2.new(h,0,z.ItemDesc.Size.Y.Scale,0)z.Visible=true z.Parent=pages.ranks end end if w>=2 then for g=1,2,1 do local N=pages.ranks.Label1 local f=pages.ranks["\076\097\098\101\108"..w]pages.ranks.CanvasSize=UDim2.new(0,0,0,(f.AbsolutePosition.Y+f.AbsoluteSize.Y)-N.AbsolutePosition.Y)end end end))()end | ---------------------------------------------------
function module:CreateRanks()
coroutine.wrap(function()
local ranksInfo = main.signals.RetrieveRanksInfo:InvokeServer()
local permRanksInfo = ranksInfo.PermRanks
local ranksToSort = ranksInfo.Ranks
local permissions = ranksInfo.Permissions
--Organise ranks
local rankPositions = {}
local ranks = {}
for i, rankDetails in pairs(ranksToSort) do
local rankId = rankDetails[1]
local rankName = rankDetails[2]
table.insert(ranks, 1, { rankId, rankName, {} })
end
for i, v in pairs(ranks) do
rankPositions[v[1]] = i
end
for pName, pDetails in pairs(permissions) do
--Owner
if pName == "owner" and rankPositions[8] then
local ownerRankDetail = ranks[rankPositions[8]]
table.insert(
ownerRankDetail[3],
{ main.ownerName, "Owner", main:GetModule("cf"):GetUserImage(main.ownerId) }
)
--SpecificUsers and PermRanks
elseif pName == "specificusers" then
for plrName, rankId in pairs(pDetails) do
if #plrName > 1 then
local rankDetail = ranks[rankPositions[rankId]]
local boxInfo = {
plrName,
"Specific User",
main:GetModule("cf"):GetUserImage(main:GetModule("cf"):GetUserId(plrName)),
}
table.insert(rankDetail[3], boxInfo)
end
end
for i, record in pairs(permRanksInfo) do
if not record.RemoveRank then
local rankDetail = ranks[rankPositions[record.Rank]]
if rankDetail then
local boxInfo = {
main:GetModule("cf"):GetName(record.UserId),
"PermRank",
main:GetModule("cf"):GetUserImage(record.UserId),
record,
}
table.insert(rankDetail[3], boxInfo)
end
end
end
elseif pName == "gamepasses" then
--Gamepasses
for gamepassId, gamepassInfo in pairs(pDetails) do
if not main:GetModule("cf"):FindValue(main.products, gamepassId) then
local rankDetail = ranks[rankPositions[gamepassInfo.Rank]]
if rankDetail then
local boxInfo = {
gamepassInfo.Name,
"Gamepass",
gamepassInfo.IconImageAssetId,
tonumber(gamepassId),
gamepassInfo.PriceInRobux,
}
table.insert(rankDetail[3], boxInfo)
end
end
end
elseif pName == "assets" then
--Assets
for assetId, assetInfo in pairs(pDetails) do
local rankDetail = ranks[rankPositions[assetInfo.Rank]]
if rankDetail then
local boxInfo = {
assetInfo.Name,
"Asset",
main:GetModule("cf"):GetAssetImage(assetId),
tonumber(assetId),
assetInfo.PriceInRobux,
}
table.insert(rankDetail[3], boxInfo)
end
end
elseif pName == "groups" then
--Groups
for groupId, groupInfo in pairs(pDetails) do
for roleName, roleInfo in pairs(groupInfo.Roles) do
if roleInfo.Rank then
local rankDetail = ranks[rankPositions[roleInfo.Rank]]
if rankDetail then
local boxInfo =
{ groupInfo.Name .. " | " .. roleName, "Group", groupInfo.EmblemUrl, tonumber(
groupId
) }
table.insert(rankDetail[3], boxInfo)
end
end
end
end
elseif otherPermissions[pName] then
--Other
local info = otherPermissions[pName]
local rank = permissions[info[1]]
if rank > 0 then
local rankDetail = ranks[rankPositions[rank]]
if rankDetail then
local boxInfo = { info[2], info[3], string.upper(string.sub(info[1], 1, 1)) }
table.insert(rankDetail[3], boxInfo)
end
end
end
end
--Can view PermRank menu
local canModifyPermRanks = false
if main.pdata.Rank >= (main.commandRanks.permrank or 4) then
canModifyPermRanks = true
end
--Clear labels
main:GetModule("cf"):ClearPage(pages.ranks)
--Setup labels
local labelCount = 0
for i, v in pairs(ranks) do
local rankId = v[1]
local rankName = v[2]
local boxes = v[3]
--
labelCount = labelCount + 1
local rankTitle = templates.rankTitle:Clone()
rankTitle.Name = "Label" .. labelCount
rankTitle.RankIdFrame.TextLabel.Text = rankId
rankTitle.RankName.Text = rankName
rankTitle.Visible = true
rankTitle.Parent = pages.ranks
--
for _, boxInfo in pairs(boxes) do
labelCount = labelCount + 1
local boxTitle = boxInfo[1]
local boxDesc = boxInfo[2]
local boxImage = boxInfo[3]
local rankItem = templates.rankItem:Clone()
rankItem.Name = "Label" .. labelCount
rankItem.ItemTitle.Text = boxTitle
rankItem.ItemDesc.Text = boxDesc
if #tostring(boxImage) == 1 then
rankItem.ItemIcon.Text = boxImage
rankItem.ItemIcon.Visible = true
rankItem.ItemImage.Visible = false
else
if tonumber(boxImage) then
boxImage = "rbxassetid://" .. boxImage
end
rankItem.ItemImage.Image = tostring(boxImage)
end
local xScale = 0.7
rankItem.Unlock.Visible = false
rankItem.ViewMore.Visible = false
if boxDesc == "Gamepass" or boxDesc == "Asset" then
local productId = boxInfo[4]
local productPrice = boxInfo[5]
rankItem.ItemImage.BackgroundTransparency = 1
rankItem.Unlock.Visible = true
rankItem.Unlock.MouseButton1Down:Connect(function()
buyFrame.ProductName.Text = boxTitle
buyFrame.ProductImage.Image = boxImage
buyFrame.PurchaseToUnlock.TextLabel.Text = rankName
buyFrame.InGame.TextLabel.Text = main.gameName
buyFrame.MainButton.Price.Text = (productPrice or 0) .. " "
buyFrame.MainButton.ProductId.Value = productId
buyFrame.MainButton.ProductType.Value = boxDesc
main:GetModule("cf"):ShowWarning("BuyFrame")
end)
xScale = 0.4
elseif boxDesc == "PermRank" then
local record = boxInfo[4]
if canModifyPermRanks then
local viewMore = rankItem.ViewMore
viewMore.Visible = true
viewMore.MouseButton1Down:Connect(function()
main:GetModule("cf"):ShowPermRankedUser({ boxTitle, record.UserId, record.RankedBy })
end)
end
xScale = 0.6
else
xScale = 0.7
end
rankItem.ItemTitle.Size = UDim2.new(xScale, 0, rankItem.ItemTitle.Size.Y.Scale, 0)
rankItem.ItemDesc.Size = UDim2.new(xScale, 0, rankItem.ItemDesc.Size.Y.Scale, 0)
rankItem.Visible = true
rankItem.Parent = pages.ranks
end
end
--Canvas Size
if labelCount >= 2 then
for i = 1, 2 do
local firstLabel = pages.ranks["Label1"]
local finalLabel = pages.ranks["Label" .. labelCount]
pages.ranks.CanvasSize = UDim2.new(
0,
0,
0,
(finalLabel.AbsolutePosition.Y + finalLabel.AbsoluteSize.Y - firstLabel.AbsolutePosition.Y)
)
end
end
end)()
end
|
local g=_Tune.FWheelDensity local N=_Tune.RWheelDensity local f=_WHEELTUNE.FFrictionWeight local j=_WHEELTUNE.RFrictionWeight local P=_WHEELTUNE.FElasticity local r=_WHEELTUNE.RElasticity local T=_WHEELTUNE.FElastWeight local w=_WHEELTUNE.RElastWeight if not workspace:PGSIsEnabled()then g=_Tune.FWLgcyDensity N=_Tune.RWLgcyDensity f=_WHEELTUNE.FLgcyFrWeight j=_WHEELTUNE.FLgcyFrWeight P=_WHEELTUNE.FLgcyElasticity r=_WHEELTUNE.RLgcyElasticity T=_WHEELTUNE.FLgcyElWeight w=_WHEELTUNE.RLgcyElWeight end local z={}for h,c in pairs(car.Wheels:GetChildren())do local v={}v.wheel=c local o v.x=0 if c.Name=="\070\076"or c.Name=="\070\082"or c.Name=="\070"then o=(12-math.abs(_Tune.FCamber))/15 v.x=g v.BaseHeat=_WHEELTUNE.FTargetFriction-_WHEELTUNE.FMinFriction v.WearSpeed=_WHEELTUNE.FWearSpeed v.fWeight=f v.elast=P v.eWeight=T else o=(12-math.abs(_Tune.RCamber))/15 v.x=N v.BaseHeat=_WHEELTUNE.RTargetFriction-_WHEELTUNE.RMinFriction v.WearSpeed=_WHEELTUNE.RWearSpeed v.fWeight=j v.elast=r v.eWeight=w end v.Heat=v.BaseHeat v.stress=0 table.insert(z,v)end | --Wheels Array
local fDensity = _Tune.FWheelDensity
local rDensity = _Tune.RWheelDensity
local fFwght = _WHEELTUNE.FFrictionWeight
local rFwght = _WHEELTUNE.RFrictionWeight
local fElast = _WHEELTUNE.FElasticity
local rElast = _WHEELTUNE.RElasticity
local fEwght = _WHEELTUNE.FElastWeight
local rEwght = _WHEELTUNE.RElastWeight
if not workspace:PGSIsEnabled() then
fDensity = _Tune.FWLgcyDensity
rDensity = _Tune.RWLgcyDensity
fFwght = _WHEELTUNE.FLgcyFrWeight
rFwght = _WHEELTUNE.FLgcyFrWeight
fElast = _WHEELTUNE.FLgcyElasticity
rElast = _WHEELTUNE.RLgcyElasticity
fEwght = _WHEELTUNE.FLgcyElWeight
rEwght = _WHEELTUNE.RLgcyElWeight
end
local Wheels = {}
for i, v in pairs(car.Wheels:GetChildren()) do
local w = {}
w.wheel = v
local ca
w.x = 0
if v.Name == "FL" or v.Name == "FR" or v.Name == "F" then
ca = (12 - math.abs(_Tune.FCamber)) / 15
w.x = fDensity
w.BaseHeat = _WHEELTUNE.FTargetFriction - _WHEELTUNE.FMinFriction
w.WearSpeed = _WHEELTUNE.FWearSpeed
w.fWeight = fFwght
w.elast = fElast
w.eWeight = fEwght
else
ca = (12 - math.abs(_Tune.RCamber)) / 15
w.x = rDensity
w.BaseHeat = _WHEELTUNE.RTargetFriction - _WHEELTUNE.RMinFriction
w.WearSpeed = _WHEELTUNE.RWearSpeed
w.fWeight = rFwght
w.elast = rElast
w.eWeight = rEwght
end
--if car:FindFirstChild("WearData")~=nil then
-- w.Heat = math.min(w.BaseHeat,car.WearData[v.Name].Value+(((tick()-car.WearData.STime.Value)*_WHEELTUNE.RegenSpeed*15/10000)))
--else
w.Heat = w.BaseHeat
--end
w.stress = 0
table.insert(Wheels, w)
end
|
local a=game:GetService("\068\101\098\114\105\115")while vehicle:FindFirstChild("\083\116\097\109\112\101\114\070\108\111\111\114")or vehicle:FindFirstChild("\083\116\097\109\112\101\114\070\108\111\111\114\050")do vehicle.ChildRemoved:wait()end local R=(vehicle:GetModelSize()).magnitude | ----------------------------------------------
local debris = game:GetService("Debris")
while vehicle:FindFirstChild("StamperFloor") or vehicle:FindFirstChild("StamperFloor2") do
vehicle.ChildRemoved:wait()
end
local vehicleSize = vehicle:GetModelSize().magnitude
|
Knockback=0 Lifesteal=0 FlamingBullet=false DualEnabled=false Piercing=0 | -- ====================
-- MISCELLANEOUS
-- Etc. settings for the gun
-- ====================
Knockback = 0 --Setting above 0 will enabling the gun to push enemy back. NOTE: If "ExplosiveEnabled" is enabled, this setting is not work
Lifesteal = 0 --In percent - Setting above 0 will allow user to steal enemy's health by dealing a damage to them.
FlamingBullet = false --Enable the bullet to set enemy on fire. Its DPS and Duration can be edited inside "IgniteScript"
DualEnabled = false --Enable the user to hold two guns instead one. In order to make this setting work, you must clone its Handle and name it to "Handle2". Enabling this setting will override Idle Animation ID.
Piercing = 0 --Setting above 0 will enabling the gun to penetrate up to XX victim(s). Cannot penetrate wall. NOTE: It doesn't work with "ExplosiveEnabled"
|
if script.Activate.Value then activate()end | -- Activate it on start.
if script.Activate.Value then
activate()
end
|
function OnUnequipped()Handle.UnequipSound:Play()Handle.EquipSound:Stop()Handle.EquipSound2:Stop()LeftButtonDown=false flare.MuzzleFlash.Enabled=false Reloading=false MyCharacter=nil MyHumanoid=nil MyTorso=nil MyPlayer=nil MyMouse=nil if OnFireConnection then OnFireConnection:disconnect()end if OnReloadConnection then OnReloadConnection:disconnect()end if FlashHolder then FlashHolder=nil end if WeaponGui then WeaponGui.Parent=nil WeaponGui=nil end if Tip then Tip.Parent=nil Tip=nil end if RecoilTrack then RecoilTrack:Stop()end if ReloadTrack then ReloadTrack:Stop()end end local function a(a)if WeaponGui and WeaponGui:FindFirstChild("\067\114\111\115\115\104\097\105\114")then for R,y in pairs(WeaponGui.Crosshair:GetChildren())do if y:IsA("\070\114\097\109\101")then y.BorderColor3=a end end end end Tool.Equipped:connect(OnEquipped)Tool.Unequipped:connect(OnUnequipped)while true do wait(.033)if WeaponGui and(WeaponGui:FindFirstChild("\067\114\111\115\115\104\097\105\114")and MyMouse)then WeaponGui.Crosshair.Position=UDim2.new(0,MyMouse.X,0,MyMouse.Y)a(NeutralReticleColor)local R=MyMouse.Target if R and R.Parent then local y=PlayersService:GetPlayerFromCharacter(R.Parent)if y then if MyPlayer.Neutral or y.TeamColor~=MyPlayer.TeamColor then a(EnemyReticleColor)else a(FriendlyReticleColor)end end end end if Spread and not IsShooting then local a=time()if a-LastSpreadUpdate>FireRate*2 then LastSpreadUpdate=a Spread=math.max(MinSpread,Spread-AimInaccuracyStepAmount)UpdateCrosshair(Spread,MyMouse)end end end | -- Unequip logic here
function OnUnequipped()
Handle.UnequipSound:Play()
Handle.EquipSound:Stop()
Handle.EquipSound2:Stop()
LeftButtonDown = false
flare.MuzzleFlash.Enabled = false
Reloading = false
MyCharacter = nil
MyHumanoid = nil
MyTorso = nil
MyPlayer = nil
MyMouse = nil
if OnFireConnection then
OnFireConnection:disconnect()
end
if OnReloadConnection then
OnReloadConnection:disconnect()
end
if FlashHolder then
FlashHolder = nil
end
if WeaponGui then
WeaponGui.Parent = nil
WeaponGui = nil
end
if Tip then
Tip.Parent = nil
Tip = nil
end
if RecoilTrack then
RecoilTrack:Stop()
end
if ReloadTrack then
ReloadTrack:Stop()
end
end
local function SetReticleColor(color)
if WeaponGui and WeaponGui:FindFirstChild("Crosshair") then
for _, line in pairs(WeaponGui.Crosshair:GetChildren()) do
if line:IsA("Frame") then
line.BorderColor3 = color
end
end
end
end
Tool.Equipped:connect(OnEquipped)
Tool.Unequipped:connect(OnUnequipped)
while true do
wait(0.033)
if WeaponGui and WeaponGui:FindFirstChild("Crosshair") and MyMouse then
WeaponGui.Crosshair.Position = UDim2.new(0, MyMouse.X, 0, MyMouse.Y)
SetReticleColor(NeutralReticleColor)
local target = MyMouse.Target
if target and target.Parent then
local player = PlayersService:GetPlayerFromCharacter(target.Parent)
if player then
if MyPlayer.Neutral or player.TeamColor ~= MyPlayer.TeamColor then
SetReticleColor(EnemyReticleColor)
else
SetReticleColor(FriendlyReticleColor)
end
end
end
end
if Spread and not IsShooting then
local currTime = time()
if currTime - LastSpreadUpdate > FireRate * 2 then
LastSpreadUpdate = currTime
Spread = math.max(MinSpread, Spread - AimInaccuracyStepAmount)
UpdateCrosshair(Spread, MyMouse)
end
end
end
|
Play_Video_Event.OnClientEvent:Connect(function()print("\112\108\097\121\105\110\103 \118\105\100\101\111 \115\111\111\110")wait(1)game.Workspace.Sound:Play()local a=0 local R=0 for y,k in pairs(Loaded_Vid)do R+=1 local z=tostring(R)for R=1,chunk_size,1 do a+=1 local y=0 local I=0 local D=tostring(a)local Y=k[z][D]for a=1,x_res,1 do I+=1 local R=tostring(I)local k=0 local z=0 local D=0 local f=false local J=0 if Y[R]~=nil then for a in string.gmatch(Y[R],"\046")do J+=1 if f==true then if J==1 then elseif J==2 then z=Hex_Dictionary[a]J=0 f=false y+=z end elseif a=="\120"then J=0 y+=1 elseif a=="\042"then f=true else if J==1 then k=Hex_Baked_Dictionary[a]elseif J==2 then z=Hex_Baked_Dictionary[a]else D=Hex_Baked_Dictionary[a]J=0 y+=1 local I=Color3.fromRGB(k,z,D)VideoScreen[R][y].Color=I end end end end end RunService.Heartbeat:Wait()RunService.Heartbeat:Wait()RunService.Heartbeat:Wait()RunService.Heartbeat:Wait()end end end) | -- white and black
--Play_Video_Event.Event:Connect(function()
-- print("playing video soon")
-- wait(1)
-- game.Workspace.Sound:Play()
-- local frames = 0
-- local chunks = 0
-- for _,v in pairs(Loaded_Vid) do
-- chunks += 1
-- local chunk = tostring(chunks)
-- local pixel = 0
-- for f = 1 , chunk_size do
-- frames += 1
-- local collums = 0
-- local frame = tostring(frames)
-- local current_frame = v[chunk][frame]
-- for i = 1 , x_res do
-- collums += 1
-- local collum = tostring(collums) -- number to string
-- for c in string.gmatch(current_frame[collum], "(%w)") do -- 'w' represents the individual letter returned
-- pixel += 1
-- if pixel == 6913 then
-- pixel = 1
-- end
-- if c == "0" then
-- VideoScreen[collum][pixel].Color = black_color
-- else
-- VideoScreen[collum][pixel].Color = white_color
-- end
-- end
-- end
-- RunService.Heartbeat:Wait()
-- RunService.Heartbeat:Wait()
-- RunService.Heartbeat:Wait()
-- RunService.Heartbeat:Wait()
-- end
-- end
--end)
Play_Video_Event.OnClientEvent:Connect(function()
print("playing video soon")
wait(1)
game.Workspace.Sound:Play()
local frames = 0
local chunks = 0
for _, v in pairs(Loaded_Vid) do
chunks += 1
local chunk = tostring(chunks)
for f = 1, chunk_size do
frames += 1
local pixel = 0
local collums = 0
local frame = tostring(frames)
local current_frame = v[chunk][frame]
for i = 1, x_res do
collums += 1
local collum = tostring(collums) -- number to string
local r = 0
local g = 0
local b = 0
local instrunction = false
local current = 0
if current_frame[collum] ~= nil then
for c in string.gmatch(current_frame[collum], ".") do -- 'w' represents the individual letter returned
current += 1
if instrunction == true then
if current == 1 then
-- do nothing as it started the instruction
elseif current == 2 then
g = Hex_Dictionary[c]
current = 0
instrunction = false
pixel += g
end
elseif c == "x" then
current = 0
pixel += 1
elseif c == "*" then
instrunction = true
else
if current == 1 then
r = Hex_Baked_Dictionary[c]
-- checks if the frame must be skipped
elseif current == 2 then
g = Hex_Baked_Dictionary[c]
else
b = Hex_Baked_Dictionary[c]
current = 0
pixel += 1
local color = Color3.fromRGB(r, g, b)
VideoScreen[collum][pixel].Color = color
end
end
end
end
--RunService.Heartbeat:Wait()
end
RunService.Heartbeat:Wait()
RunService.Heartbeat:Wait()
RunService.Heartbeat:Wait()
RunService.Heartbeat:Wait()
end
end
end)
|
local a={}if game.Workspace:FindFirstChild("\066\097\115\101\080\108\097\116\101")then game.Workspace.BasePlate:Destroy()end local R=Instance.new("\077\111\100\101\108")R.Name="\084\114\097\099\107\115"R.Parent=game.Workspace function packagePathModels()local a=require(script.PathPackager)while true do local R=game.Workspace:FindFirstChild("\080\097\116\104\066\097\115\101",true)if R then a:PackageRoom(R)else break end end end;(coroutine.wrap(function()packagePathModels()end))() | -- Initialization
local lastActivePath = {}
if game.Workspace:FindFirstChild("BasePlate") then
game.Workspace.BasePlate:Destroy()
end
local tracksModel = Instance.new("Model")
tracksModel.Name = "Tracks"
tracksModel.Parent = game.Workspace
function packagePathModels()
local pathPackager = require(script.PathPackager)
while true do
local pathBase = game.Workspace:FindFirstChild("PathBase", true)
if pathBase then
pathPackager:PackageRoom(pathBase)
else
break
end
end
end
coroutine.wrap(function()
packagePathModels()
end)()
|
module.WindowDraggable=false module.WindowResizable=false module.ShowChannelsBar=false module.GamepadNavigationEnabled=false module.AllowMeCommand=false module.ShowUserOwnFilteredMessage=true | ---[[ Chat Behaviour Settings ]]
module.WindowDraggable = false
module.WindowResizable = false
module.ShowChannelsBar = false
module.GamepadNavigationEnabled = false
module.AllowMeCommand = false -- Me Command will only be effective when this set to true
module.ShowUserOwnFilteredMessage = true --Show a user the filtered version of their message rather than the original.
|
local a={}local function R(R,y,k)if R and y then local y,z=FindCharacterAncestor(R.Parent)if y then local a=CreatorTag.Value if a and not a.Neutral then local R=PlayersService:GetPlayerFromCharacter(y)if R and(R~=a and R.TeamColor==Rocket.BrickColor)then return end end end if z and z.Health>0 then if not IsInTable(a,z)then print("\084\097\103\103\101\100")table.insert(a,z)ApplyTags(z)z:TakeDamage(BLAST_DAMAGE)end else if R.Name~="\072\097\110\100\108\101"then R:BreakJoints()local a=Instance.new("\066\111\100\121\070\111\114\099\101",R)a.Force=((R.Position-k).unit*BLAST_FORCE)*R:GetMass()DebrisService:AddItem(a,.1)end end end end local function y(a)if Rocket and a then if IGNORE_LIST[string.lower(a.Name)]then return end local y=CreatorTag.Value if y then if y.Character and y.Character:IsAncestorOf(a)then return end if not y.Neutral then local R=FindCharacterAncestor(a.Parent)local k=PlayersService:GetPlayerFromCharacter(R)if k and(k~=y and k.TeamColor==Rocket.BrickColor)then return end end end if a==workspace.Terrain then local a=Rocket.Position+Rocket.CFrame.lookVector*(Rocket.Size.Z/2)local R=workspace.Terrain:WorldToCellPreferSolid(a)local y=workspace.Terrain:GetCell(R.X,R.Y,R.Z)if y==Enum.CellMaterial.Water or y==Enum.CellMaterial.Empty then return end end local k=Instance.new("\069\120\112\108\111\115\105\111\110")k.BlastPressure=0 k.BlastRadius=BLAST_RADIUS k.ExplosionType=Enum.ExplosionType.NoCraters k.Position=Rocket.Position k.Parent=workspace k.Hit:Connect(function(a,y)R(a,y,k.Position)end)script.Parent=k CreatorTag.Parent=script Rocket:Destroy()end end | -- Customized explosive effect that doesn't affect teammates and only breaks joints on dead parts
local TaggedHumanoids = {}
local function OnExplosionHit(hitPart, hitDistance, blastCenter)
if hitPart and hitDistance then
local character, humanoid = FindCharacterAncestor(hitPart.Parent)
if character then
local myPlayer = CreatorTag.Value
if myPlayer and not myPlayer.Neutral then -- Ignore friendlies caught in the blast
local player = PlayersService:GetPlayerFromCharacter(character)
if player and player ~= myPlayer and player.TeamColor == Rocket.BrickColor then
return
end
end
end
if humanoid and humanoid.Health > 0 then -- Humanoids are tagged and damaged
if not IsInTable(TaggedHumanoids, humanoid) then
print("Tagged")
table.insert(TaggedHumanoids, humanoid)
ApplyTags(humanoid)
humanoid:TakeDamage(BLAST_DAMAGE)
end
else -- Loose parts and dead parts are blasted
if hitPart.Name ~= "Handle" then
hitPart:BreakJoints()
local blastForce = Instance.new("BodyForce", hitPart) --NOTE: We will multiply by mass so bigger parts get blasted more
blastForce.Force = (hitPart.Position - blastCenter).unit * BLAST_FORCE * hitPart:GetMass()
DebrisService:AddItem(blastForce, 0.1)
end
end
end
end
local function OnTouched(otherPart)
if Rocket and otherPart then
-- Fly through anything in the ignore list
if IGNORE_LIST[string.lower(otherPart.Name)] then
return
end
local myPlayer = CreatorTag.Value
if myPlayer then
-- Fly through the creator
if myPlayer.Character and myPlayer.Character:IsAncestorOf(otherPart) then
return
end
-- Fly through friendlies
if not myPlayer.Neutral then
local character = FindCharacterAncestor(otherPart.Parent)
local player = PlayersService:GetPlayerFromCharacter(character)
if player and player ~= myPlayer and player.TeamColor == Rocket.BrickColor then
return
end
end
end
-- Fly through terrain water
if otherPart == workspace.Terrain then
--NOTE: If the rocket is large, then the simplifications made here will cause it to fly through terrain in some cases
local frontOfRocket = Rocket.Position + (Rocket.CFrame.lookVector * (Rocket.Size.Z / 2))
local cellLocation = workspace.Terrain:WorldToCellPreferSolid(frontOfRocket)
local cellMaterial = workspace.Terrain:GetCell(cellLocation.X, cellLocation.Y, cellLocation.Z)
if cellMaterial == Enum.CellMaterial.Water or cellMaterial == Enum.CellMaterial.Empty then
return
end
end
-- Create the explosion
local explosion = Instance.new("Explosion")
explosion.BlastPressure = 0 -- Completely safe explosion
explosion.BlastRadius = BLAST_RADIUS
explosion.ExplosionType = Enum.ExplosionType.NoCraters
explosion.Position = Rocket.Position
explosion.Parent = workspace
-- Connect custom logic for the explosion
explosion.Hit:Connect(function(hitPart, hitDistance)
OnExplosionHit(hitPart, hitDistance, explosion.Position)
end)
-- Move this script and the creator tag (so our custom logic can execute), then destroy the rocket
script.Parent = explosion
CreatorTag.Parent = script
Rocket:Destroy()
end
end
|
local a=Instance.new("\080\097\114\116")a.Size=Vector3.new(.3,.3,.3)a.Anchored=true a.CanCollide=false a.Material=Enum.Material.Neon a.Shape=Enum.PartType.Ball | --Used to visualize waypoints
local visualWaypoint = Instance.new("Part")
visualWaypoint.Size = Vector3.new(0.3, 0.3, 0.3)
visualWaypoint.Anchored = true
visualWaypoint.CanCollide = false
visualWaypoint.Material = Enum.Material.Neon
visualWaypoint.Shape = Enum.PartType.Ball
|
settings.Permissions={} | --// Use the below table to set command permissions; Commented commands are included for example purposes
settings.Permissions = {
-- "ff:HeadAdmins"; --// Changes :ff to HeadAdmins and higher (HeadAdmins = Level 300 by default)
-- "kill:300"; --// Changes :kill to level 300 and higher (Level 300 = HeadAdmins by default)
-- "ban:200,300" --// Makes it so :ban is only usable by levels 200 and 300 specifically (nothing higher or lower or in between)
} -- Format: {"Command:NewLevel"; "Command:Customrank1,Customrank2,Customrank3";}
|
function Icon.mimic(a)local R=a.."\077\105\109\105\099"local y=IconController.getIcon(R)if y then return y end y=Icon.new()y:setName(R)if a=="\067\104\097\116"then y:setOrder(-1)y:setImage("\114\098\120\097\115\115\101\116\058\047\047\116\101\120\116\117\114\101\115\047\117\105\047\084\111\112\066\097\114\047\099\104\097\116\079\102\102\046\112\110\103","\100\101\115\101\108\101\099\116\101\100")y:setImage("\114\098\120\097\115\115\101\116\058\047\047\116\101\120\116\117\114\101\115\047\117\105\047\084\111\112\066\097\114\047\099\104\097\116\079\110\046\112\110\103","\115\101\108\101\099\116\101\100")y:setImageYScale(.625)end return y end | -- This is the same as Icon.new(), except it adds additional behaviour for certain specified names designed to mimic core icons, such as 'Chat'
function Icon.mimic(coreIconToMimic)
local iconName = coreIconToMimic .. "Mimic"
local icon = IconController.getIcon(iconName)
if icon then
return icon
end
icon = Icon.new()
icon:setName(iconName)
if coreIconToMimic == "Chat" then
icon:setOrder(-1)
icon:setImage("rbxasset://textures/ui/TopBar/chatOff.png", "deselected")
icon:setImage("rbxasset://textures/ui/TopBar/chatOn.png", "selected")
icon:setImageYScale(0.625)
-- Since roblox's core gui api sucks melons I reverted to listening for signals within the chat modules
-- unfortunately however they've just gone and removed *these* signals therefore
-- this mimic chat and similar features are now impossible to recreate accurately, so I'm disabling for now
-- ill go ahead and post a feature request; fingers crossed we get something by the next decade
--[[
-- Setup maid and cleanup actioon
local maid = icon._maid
icon._fakeChatMaid = maid:give(Maid.new())
maid.chatMimicCleanup = function()
starterGui:SetCoreGuiEnabled("Chat", icon.enabled)
end
-- Tap into chat module
local chatMainModule = localPlayer.PlayerScripts:WaitForChild("ChatScript").ChatMain
local ChatMain = require(chatMainModule)
local function displayChatBar(visibility)
icon.ignoreVisibilityStateChange = true
ChatMain.CoreGuiEnabled:fire(visibility)
ChatMain.IsCoreGuiEnabled = false
ChatMain:SetVisible(visibility)
icon.ignoreVisibilityStateChange = nil
end
local function setIconEnabled(visibility)
icon.ignoreVisibilityStateChange = true
ChatMain.CoreGuiEnabled:fire(visibility)
icon:setEnabled(visibility)
starterGui:SetCoreGuiEnabled("Chat", false)
icon:deselect()
icon.updated:Fire()
icon.ignoreVisibilityStateChange = nil
end
-- Open chat via Slash key
icon._fakeChatMaid:give(userInputService.InputEnded:Connect(function(inputObject, gameProcessedEvent)
if gameProcessedEvent then
return "Another menu has priority"
elseif not(inputObject.KeyCode == Enum.KeyCode.Slash or inputObject.KeyCode == Enum.SpecialKey.ChatHotkey) then
return "No relavent key pressed"
elseif ChatMain.IsFocused() then
return "Chat bar already open"
elseif not icon.enabled then
return "Icon disabled"
end
ChatMain:FocusChatBar(true)
icon:select()
end))
-- ChatActive
icon._fakeChatMaid:give(ChatMain.VisibilityStateChanged:Connect(function(visibility)
if not icon.ignoreVisibilityStateChange then
if visibility == true then
icon:select()
else
icon:deselect()
end
end
end))
-- Keep when other icons selected
icon.deselectWhenOtherIconSelected = false
-- Mimic chat notifications
icon._fakeChatMaid:give(ChatMain.MessagesChanged:connect(function()
if ChatMain:GetVisibility() == true then
return "ChatWindow was open"
end
icon:notify(icon.selected)
end))
-- Mimic visibility when StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, state) is called
coroutine.wrap(function()
runService.Heartbeat:Wait()
icon._fakeChatMaid:give(ChatMain.CoreGuiEnabled:connect(function(newState)
if icon.ignoreVisibilityStateChange then
return "ignoreVisibilityStateChange enabled"
end
local topbarEnabled = starterGui:GetCore("TopbarEnabled")
if topbarEnabled ~= IconController.previousTopbarEnabled then
return "SetCore was called instead of SetCoreGuiEnabled"
end
if not icon.enabled and userInputService:IsKeyDown(Enum.KeyCode.LeftShift) and userInputService:IsKeyDown(Enum.KeyCode.P) then
icon:setEnabled(true)
else
setIconEnabled(newState)
end
end))
end)()
icon.deselected:Connect(function()
displayChatBar(false)
end)
icon.selected:Connect(function()
displayChatBar(true)
end)
setIconEnabled(starterGui:GetCoreGuiEnabled("Chat"))
--]]
end
return icon
end
|
CanSelectFire=false BurstEnabled=false SemiEnabled=true AutoEnabled=false BoltAction=false ExplosiveEnabled=false | --// Firemode Settings
CanSelectFire = false
BurstEnabled = false
SemiEnabled = true
AutoEnabled = false
BoltAction = false
ExplosiveEnabled = false
|
local a=game:GetService("\068\101\098\114\105\115")a:AddItem(script.Parent,24) | -- this script removes its parent from the workspace after 24 seconds
local Debris = game:GetService("Debris")
Debris:AddItem(script.Parent, 24)
|
local function a(a,R)if not R then local R=screenSpace.ScreenToWorld(a.Position.X,a.Position.Y,1)local y=game.Workspace.CurrentCamera.CoordinateFrame:vectorToWorldSpace(screenSpace.ScreenToWorld(a.Position.X,a.Position.Y,1))y=game.Workspace.CurrentCamera.CoordinateFrame.p-y local k=screenSpace.ScreenToWorld(a.Position.X,a.Position.Y,50)k=game.Workspace.CurrentCamera.CoordinateFrame:vectorToWorldSpace(k)*-1 if k.magnitude>900 then k=k.unit*900 end local z=Ray.new(y,k)local I,D=game.Workspace:FindPartOnRay(z,player.Character)if D then frame(D)end end end local R=nil | -- Function to bind to touch moved if player is on mobile
local function mobileFrame(touch, processed)
-- Check to see if the touch was on a UI element. If so, we don't want to update anything
if not processed then
-- Calculate touch position in world space. Uses Stravant's ScreenSpace Module script
-- to create a ray from the camera.
local test = screenSpace.ScreenToWorld(touch.Position.X, touch.Position.Y, 1)
local nearPos = game.Workspace.CurrentCamera.CoordinateFrame:vectorToWorldSpace(
screenSpace.ScreenToWorld(touch.Position.X, touch.Position.Y, 1)
)
nearPos = game.Workspace.CurrentCamera.CoordinateFrame.p - nearPos
local farPos = screenSpace.ScreenToWorld(touch.Position.X, touch.Position.Y, 50)
farPos = game.Workspace.CurrentCamera.CoordinateFrame:vectorToWorldSpace(farPos) * -1
if farPos.magnitude > 900 then
farPos = farPos.unit * 900
end
local ray = Ray.new(nearPos, farPos)
local part, pos = game.Workspace:FindPartOnRay(ray, player.Character)
-- if a position was found on the ray then update the character's rotation
if pos then
frame(pos)
end
end
end
local oldIcon = nil
|
Tune.Horsepower=231 Tune.IdleRPM=700 Tune.PeakRPM=5000 Tune.Redline=7000 Tune.EqPoint=5600 Tune.PeakSharpness=7.5 Tune.CurveMult=.16 Tune.InclineComp=2 Tune.RevAccel=150 Tune.RevDecay=75 Tune.RevBounce=500 Tune.IdleThrottle=3 Tune.ClutchTol=468 | --[[Engine]]
--Torque Curve
Tune.Horsepower = 231 -- [TORQUE CURVE VISUAL]
Tune.IdleRPM = 700 -- https://www.desmos.com/calculator/2uo3hqwdhf
Tune.PeakRPM = 5000 -- Use sliders to manipulate values
Tune.Redline = 7000 -- Copy and paste slider values into the respective tune values
Tune.EqPoint = 5600
Tune.PeakSharpness = 7.5
Tune.CurveMult = 0.16
--Incline Compensation
Tune.InclineComp = 2 -- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
--Misc
Tune.RevAccel = 150 -- RPM acceleration when clutch is off
Tune.RevDecay = 75 -- RPM decay when clutch is off
Tune.RevBounce = 500 -- RPM kickback from redline
Tune.IdleThrottle = 3 -- Percent throttle at idle
Tune.ClutchTol = 468 -- Clutch engagement threshold (higher = faster response)
|
function ClickToMove.UpdateJump(a)if FFlagUserClickToMoveFollowPathRefactor then else a.isJumping=a.jumpRequested end end | -- Overrides Keyboard:UpdateJump() because jump is handled in OnRenderStepped
function ClickToMove:UpdateJump()
if FFlagUserClickToMoveFollowPathRefactor then
-- Nothing to do (handled in OnRenderStepped)
else
self.isJumping = self.jumpRequested
end
end
|
function Promise.prototype._unwrap(a)if a._status==Promise.Status.Started then error("\080\114\111\109\105\115\101 \104\097\115 \110\111\116 \114\101\115\111\108\118\101\100 \111\114 \114\101\106\101\099\116\101\100\046",2)end local R=a._status==Promise.Status.Resolved return R,unpack(a._values,1,a._valuesLength)end function Promise.prototype._resolve(a,...)if a._status~=Promise.Status.Started then if Promise.is(...)then(...):_consumerCancelled(a)end return end if Promise.is(...)then if select("\035",...)>1 then local R=string.format("\087\104\101\110 \114\101\116\117\114\110\105\110\103 \097 \080\114\111\109\105\115\101 \102\114\111\109 \097\110\100\084\104\101\110\044 \101\120\116\114\097 \097\114\103\117\109\101\110\116\115 \097\114\101 \100\105\115\099\097\114\100\101\100\033 \083\101\101\058\n\n\037\115",a._source)warn(R)end local R=...local y=R:andThen(function(...)a:_resolve(...)end,function(...)local y=R._values[1]if R._error then y=Error.new({error=R._error,kind=Error.Kind.ExecutionError;context="\091\078\111 \115\116\097\099\107 \116\114\097\099\101 \097\118\097\105\108\097\098\108\101 \097\115 \116\104\105\115 \080\114\111\109\105\115\101 \111\114\105\103\105\110\097\116\101\100 \102\114\111\109 \097\110 \111\108\100\101\114 \118\101\114\115\105\111\110 \111\102 \116\104\101 \080\114\111\109\105\115\101 \108\105\098\114\097\114\121 \040\060 \118\050\041\093"})end if Error.isKind(y,Error.Kind.ExecutionError)then return a:_reject(y:extend({error="\084\104\105\115 \080\114\111\109\105\115\101 \119\097\115 \099\104\097\105\110\101\100 \116\111 \097 \080\114\111\109\105\115\101 \116\104\097\116 \101\114\114\111\114\101\100\046";trace="",context=string.format("\084\104\101 \080\114\111\109\105\115\101 \097\116\058\n\n\037\115\n\046\046\046\082\101\106\101\099\116\101\100 \098\101\099\097\117\115\101 \105\116 \119\097\115 \099\104\097\105\110\101\100 \116\111 \116\104\101 \102\111\108\108\111\119\105\110\103 \080\114\111\109\105\115\101\044 \119\104\105\099\104 \101\110\099\111\117\110\116\101\114\101\100 \097\110 \101\114\114\111\114\058\n",a._source)}))end a:_reject(...)end)if y._status==Promise.Status.Cancelled then a:cancel()elseif y._status==Promise.Status.Started then a._parent=y y._consumers[a]=true end return end a._status=Promise.Status.Resolved a._valuesLength,a._values=pack(...)for a,R in ipairs(a._queuedResolve)do(coroutine.wrap(R))(...)end a:_finalize()end function Promise.prototype._reject(a,...)if a._status~=Promise.Status.Started then return end a._status=Promise.Status.Rejected a._valuesLength,a._values=pack(...)if not isEmpty(a._queuedReject)then for a,R in ipairs(a._queuedReject)do(coroutine.wrap(R))(...)end else local R=tostring(...);(coroutine.wrap(function()Promise._timeEvent:Wait()if not a._unhandledRejection then return end local y=string.format("\085\110\104\097\110\100\108\101\100 \080\114\111\109\105\115\101 \114\101\106\101\099\116\105\111\110\058\n\n\037\115\n\n\037\115",R,a._source)for R,y in ipairs(Promise._unhandledRejectionCallbacks)do task.spawn(y,a,unpack(a._values,1,a._valuesLength))end if Promise.TEST then return end warn(y)end))()end a:_finalize()end | --[[
Intended for use in tests.
Similar to await(), but instead of yielding if the promise is unresolved,
_unwrap will throw. This indicates an assumption that a promise has
resolved.
]]
function Promise.prototype:_unwrap()
if self._status == Promise.Status.Started then
error("Promise has not resolved or rejected.", 2)
end
local success = self._status == Promise.Status.Resolved
return success, unpack(self._values, 1, self._valuesLength)
end
function Promise.prototype:_resolve(...)
if self._status ~= Promise.Status.Started then
if Promise.is((...)) then
(...):_consumerCancelled(self)
end
return
end
-- If the resolved value was a Promise, we chain onto it!
if Promise.is((...)) then
-- Without this warning, arguments sometimes mysteriously disappear
if select("#", ...) > 1 then
local message = string.format(
"When returning a Promise from andThen, extra arguments are " .. "discarded! See:\n\n%s",
self._source
)
warn(message)
end
local chainedPromise = ...
local promise = chainedPromise:andThen(function(...)
self:_resolve(...)
end, function(...)
local maybeRuntimeError = chainedPromise._values[1]
-- Backwards compatibility < v2
if chainedPromise._error then
maybeRuntimeError = Error.new({
error = chainedPromise._error,
kind = Error.Kind.ExecutionError,
context = "[No stack trace available as this Promise originated from an older version of the Promise library (< v2)]",
})
end
if Error.isKind(maybeRuntimeError, Error.Kind.ExecutionError) then
return self:_reject(maybeRuntimeError:extend({
error = "This Promise was chained to a Promise that errored.",
trace = "",
context = string.format(
"The Promise at:\n\n%s\n...Rejected because it was chained to the following Promise, which encountered an error:\n",
self._source
),
}))
end
self:_reject(...)
end)
if promise._status == Promise.Status.Cancelled then
self:cancel()
elseif promise._status == Promise.Status.Started then
-- Adopt ourselves into promise for cancellation propagation.
self._parent = promise
promise._consumers[self] = true
end
return
end
self._status = Promise.Status.Resolved
self._valuesLength, self._values = pack(...)
-- We assume that these callbacks will not throw errors.
for _, callback in ipairs(self._queuedResolve) do
coroutine.wrap(callback)(...)
end
self:_finalize()
end
function Promise.prototype:_reject(...)
if self._status ~= Promise.Status.Started then
return
end
self._status = Promise.Status.Rejected
self._valuesLength, self._values = pack(...)
-- If there are any rejection handlers, call those!
if not isEmpty(self._queuedReject) then
-- We assume that these callbacks will not throw errors.
for _, callback in ipairs(self._queuedReject) do
coroutine.wrap(callback)(...)
end
else
-- At this point, no one was able to observe the error.
-- An error handler might still be attached if the error occurred
-- synchronously. We'll wait one tick, and if there are still no
-- observers, then we should put a message in the console.
local err = tostring((...))
coroutine.wrap(function()
Promise._timeEvent:Wait()
-- Someone observed the error, hooray!
if not self._unhandledRejection then
return
end
-- Build a reasonable message
local message = string.format("Unhandled Promise rejection:\n\n%s\n\n%s", err, self._source)
for _, callback in ipairs(Promise._unhandledRejectionCallbacks) do
task.spawn(callback, self, unpack(self._values, 1, self._valuesLength))
end
if Promise.TEST then
-- Don't spam output when we're running tests.
return
end
warn(message)
end)()
end
self:_finalize()
end
|
local a=game:GetService("\080\108\097\121\101\114\115")local R=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local y=game:GetService("\067\104\097\116")local k=game:GetService("\084\101\120\116\083\101\114\118\105\099\101") | --[[ SERVICES ]]
local PlayersService = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ChatService = game:GetService("Chat")
local TextService = game:GetService("TextService")
|
Tune.Peripherals={MSteerWidth=67,MSteerDZone=10;ControlLDZone=5,ControlRDZone=5}Tune.Controls={ToggleTCS=Enum.KeyCode.World0,ToggleABS=Enum.KeyCode.World0,ToggleTransMode=Enum.KeyCode.World0;ToggleMouseDrive=Enum.KeyCode.World0,Throttle=Enum.KeyCode.Up;Brake=Enum.KeyCode.Down,SteerLeft=Enum.KeyCode.Left,SteerRight=Enum.KeyCode.Right;Throttle2=Enum.KeyCode.W,Brake2=Enum.KeyCode.S;SteerLeft2=Enum.KeyCode.A;SteerRight2=Enum.KeyCode.D,ShiftUp=Enum.KeyCode.E;ShiftDown=Enum.KeyCode.Q;Clutch=Enum.KeyCode.LeftShift,PBrake=Enum.KeyCode.P,MouseThrottle=Enum.UserInputType.MouseButton1,MouseBrake=Enum.UserInputType.MouseButton2;MouseClutch=Enum.KeyCode.W;MouseShiftUp=Enum.KeyCode.E,MouseShiftDown=Enum.KeyCode.Q,MousePBrake=Enum.KeyCode.LeftShift,ContlrThrottle=Enum.KeyCode.ButtonR2,ContlrBrake=Enum.KeyCode.ButtonL2;ContlrSteer=Enum.KeyCode.Thumbstick1,ContlrShiftUp=Enum.KeyCode.ButtonY,ContlrShiftDown=Enum.KeyCode.ButtonX;ContlrClutch=Enum.KeyCode.ButtonR1,ContlrPBrake=Enum.KeyCode.ButtonL1,ContlrToggleTMode=Enum.KeyCode.DPadUp;ContlrToggleTCS=Enum.KeyCode.DPadDown,ContlrToggleABS=Enum.KeyCode.DPadRight} | --[[[Default Controls]]
--Peripheral Deadzones
Tune.Peripherals = {
MSteerWidth = 67, -- Mouse steering control width (0 - 100% of screen width)
MSteerDZone = 10, -- Mouse steering deadzone (0 - 100%)
ControlLDZone = 5, -- Controller steering L-deadzone (0 - 100%)
ControlRDZone = 5, -- Controller steering R-deadzone (0 - 100%)
}
--Control Mapping
Tune.Controls = {
--Keyboard Controls
--Mode Toggles
ToggleTCS = Enum.KeyCode.World0,
ToggleABS = Enum.KeyCode.World0,
ToggleTransMode = Enum.KeyCode.World0,
ToggleMouseDrive = Enum.KeyCode.World0,
--Primary Controls
Throttle = Enum.KeyCode.Up,
Brake = Enum.KeyCode.Down,
SteerLeft = Enum.KeyCode.Left,
SteerRight = Enum.KeyCode.Right,
--Secondary Controls
Throttle2 = Enum.KeyCode.W,
Brake2 = Enum.KeyCode.S,
SteerLeft2 = Enum.KeyCode.A,
SteerRight2 = Enum.KeyCode.D,
--Manual Transmission
ShiftUp = Enum.KeyCode.E,
ShiftDown = Enum.KeyCode.Q,
Clutch = Enum.KeyCode.LeftShift,
--Handbrake
PBrake = Enum.KeyCode.P,
--Mouse Controls
MouseThrottle = Enum.UserInputType.MouseButton1,
MouseBrake = Enum.UserInputType.MouseButton2,
MouseClutch = Enum.KeyCode.W,
MouseShiftUp = Enum.KeyCode.E,
MouseShiftDown = Enum.KeyCode.Q,
MousePBrake = Enum.KeyCode.LeftShift,
--Controller Mapping
ContlrThrottle = Enum.KeyCode.ButtonR2,
ContlrBrake = Enum.KeyCode.ButtonL2,
ContlrSteer = Enum.KeyCode.Thumbstick1,
ContlrShiftUp = Enum.KeyCode.ButtonY,
ContlrShiftDown = Enum.KeyCode.ButtonX,
ContlrClutch = Enum.KeyCode.ButtonR1,
ContlrPBrake = Enum.KeyCode.ButtonL1,
ContlrToggleTMode = Enum.KeyCode.DPadUp,
ContlrToggleTCS = Enum.KeyCode.DPadDown,
ContlrToggleABS = Enum.KeyCode.DPadRight,
}
|
function Basic.TableToArray(a)local R={}for a,y in pairs(a)do table.insert(R,y)end return R end | -- @Description Return a copy of the table without any keys.
-- @Arg1 Table
function Basic.TableToArray(Tbl)
local Array = {}
for _, v in pairs(Tbl) do
table.insert(Array, v)
end
return Array
end
|
local function a(a)motorFL.AngularVelocity=a motorBL.AngularVelocity=a motorFR.AngularVelocity=-a motorBR.AngularVelocity=-a end | -- Set the "AngularVelocity" property on all of the CylindricalConstraint motors
local function setMotorVelocity(vel)
motorFL.AngularVelocity = vel
motorBL.AngularVelocity = vel
-- Motors on the right side are facing the opposite direction, so negative velocity must be used
motorFR.AngularVelocity = -vel
motorBR.AngularVelocity = -vel
end
|
local a=game:GetService("\080\108\097\121\101\114\115")local R=nil local y=nil local k=nil local z={}local I={}local D=0 local Y=0 local f=false local J=CFrame.new | -----------------
--| Variables |--
-----------------
local PlayersService = game:GetService("Players")
local Camera = nil
local CameraSubjectChangeConn = nil
local SubjectPart = nil
local PlayerCharacters = {} -- For ignoring in raycasts
local VehicleParts = {} -- Also just for ignoring
local LastPopAmount = 0
local LastZoomLevel = 0
local PopperEnabled = false
local CFrame_new = CFrame.new
|
local function a(a)return function(R)local y=Instance.new(a)local k=R.Parent R.Parent=nil for a,R in pairs(R)do if type(a)=="\115\116\114\105\110\103"then y[a]=R else R.Parent=y end end y.Parent=k return y end end local R=false local y local k local z local I local D local function Y()assert(not R)y=(a("\083\099\114\101\101\110\071\117\105"))({Name="\082\098\120\067\097\109\101\114\097\085\073",AutoLocalize=false;Enabled=true,DisplayOrder=-1;IgnoreGuiInset=false,ResetOnSpawn=false,ZIndexBehavior=Enum.ZIndexBehavior.Sibling;(a("\073\109\097\103\101\076\097\098\101\108"))({Name="\084\111\097\115\116";Visible=false,AnchorPoint=Vector2.new(.5,0),BackgroundTransparency=1;BorderSizePixel=0,Position=UDim2.new(.5,0,0,8);Size=TOAST_CLOSED_SIZE;Image="\114\098\120\097\115\115\101\116\058\047\047\116\101\120\116\117\114\101\115\047\117\105\047\067\097\109\101\114\097\047\067\097\109\101\114\097\084\111\097\115\116\057\083\108\105\099\101\046\112\110\103",ImageColor3=TOAST_BACKGROUND_COLOR;ImageRectSize=Vector2.new(6,6);ImageTransparency=1,ScaleType=Enum.ScaleType.Slice,SliceCenter=Rect.new(3,3,3,3),ClipsDescendants=true;(a("\070\114\097\109\101"))({Name="\073\099\111\110\066\117\102\102\101\114",BackgroundTransparency=1,BorderSizePixel=0,Position=UDim2.new(0,0,0,0),Size=UDim2.new(0,80,1,0);(a("\073\109\097\103\101\076\097\098\101\108"))({Name="\073\099\111\110",AnchorPoint=Vector2.new(.5,.5);BackgroundTransparency=1,Position=UDim2.new(.5,0,.5,0),Size=UDim2.new(0,48,0,48);ZIndex=2,Image="\114\098\120\097\115\115\101\116\058\047\047\116\101\120\116\117\114\101\115\047\117\105\047\067\097\109\101\114\097\047\067\097\109\101\114\097\084\111\097\115\116\073\099\111\110\046\112\110\103";ImageColor3=TOAST_FOREGROUND_COLOR,ImageTransparency=1})}),(a("\070\114\097\109\101"))({Name="\084\101\120\116\066\117\102\102\101\114";BackgroundTransparency=1,BorderSizePixel=0,Position=UDim2.new(0,80,0,0);Size=UDim2.new(1,-80,1,0);ClipsDescendants=true;(a("\084\101\120\116\076\097\098\101\108"))({Name="\085\112\112\101\114";AnchorPoint=Vector2.new(0,1);BackgroundTransparency=1,Position=UDim2.new(0,0,.5,0);Size=UDim2.new(1,0,0,19);Font=Enum.Font.GothamSemibold,Text="\067\097\109\101\114\097 \099\111\110\116\114\111\108 \101\110\097\098\108\101\100";TextColor3=TOAST_FOREGROUND_COLOR;TextTransparency=1,TextSize=19;TextXAlignment=Enum.TextXAlignment.Left;TextYAlignment=Enum.TextYAlignment.Center});(a("\084\101\120\116\076\097\098\101\108"))({Name="\076\111\119\101\114";AnchorPoint=Vector2.new(0,0),BackgroundTransparency=1;Position=UDim2.new(0,0,.5,3),Size=UDim2.new(1,0,0,15),Font=Enum.Font.Gotham,Text="\082\105\103\104\116 \109\111\117\115\101 \098\117\116\116\111\110 \116\111 \116\111\103\103\108\101",TextColor3=TOAST_FOREGROUND_COLOR,TextTransparency=1;TextSize=15,TextXAlignment=Enum.TextXAlignment.Left;TextYAlignment=Enum.TextYAlignment.Center})})}),Parent=PlayerGui})k=y.Toast z=k.IconBuffer.Icon I=k.TextBuffer.Upper D=k.TextBuffer.Lower R=true end local f={}do function f.setCameraModeToastEnabled(a)if not a and not R then return end if not R then Y()end k.Visible=a if not a then f.setCameraModeToastOpen(false)end end local a=TweenInfo.new(.25,Enum.EasingStyle.Quad,Enum.EasingDirection.Out)function f.setCameraModeToastOpen(y)assert(R);(TweenService:Create(k,a,{Size=y and TOAST_OPEN_SIZE or TOAST_CLOSED_SIZE,ImageTransparency=y and TOAST_BACKGROUND_TRANS or 1})):Play();(TweenService:Create(z,a,{ImageTransparency=y and TOAST_FOREGROUND_TRANS or 1})):Play();(TweenService:Create(I,a,{TextTransparency=y and TOAST_FOREGROUND_TRANS or 1})):Play();(TweenService:Create(D,a,{TextTransparency=y and TOAST_FOREGROUND_TRANS or 1})):Play()end end return f | -- Convenient syntax for creating a tree of instanes
local function create(className)
return function(props)
local inst = Instance.new(className)
local parent = props.Parent
props.Parent = nil
for name, val in pairs(props) do
if type(name) == "string" then
inst[name] = val
else
val.Parent = inst
end
end
-- Only set parent after all other properties are initialized
inst.Parent = parent
return inst
end
end
local initialized = false
local uiRoot
local toast
local toastIcon
local toastUpperText
local toastLowerText
local function initializeUI()
assert(not initialized)
uiRoot = create("ScreenGui")({
Name = "RbxCameraUI",
AutoLocalize = false,
Enabled = true,
DisplayOrder = -1, -- Appears behind default developer UI
IgnoreGuiInset = false,
ResetOnSpawn = false,
ZIndexBehavior = Enum.ZIndexBehavior.Sibling,
create("ImageLabel")({
Name = "Toast",
Visible = false,
AnchorPoint = Vector2.new(0.5, 0),
BackgroundTransparency = 1,
BorderSizePixel = 0,
Position = UDim2.new(0.5, 0, 0, 8),
Size = TOAST_CLOSED_SIZE,
Image = "rbxasset://textures/ui/Camera/CameraToast9Slice.png",
ImageColor3 = TOAST_BACKGROUND_COLOR,
ImageRectSize = Vector2.new(6, 6),
ImageTransparency = 1,
ScaleType = Enum.ScaleType.Slice,
SliceCenter = Rect.new(3, 3, 3, 3),
ClipsDescendants = true,
create("Frame")({
Name = "IconBuffer",
BackgroundTransparency = 1,
BorderSizePixel = 0,
Position = UDim2.new(0, 0, 0, 0),
Size = UDim2.new(0, 80, 1, 0),
create("ImageLabel")({
Name = "Icon",
AnchorPoint = Vector2.new(0.5, 0.5),
BackgroundTransparency = 1,
Position = UDim2.new(0.5, 0, 0.5, 0),
Size = UDim2.new(0, 48, 0, 48),
ZIndex = 2,
Image = "rbxasset://textures/ui/Camera/CameraToastIcon.png",
ImageColor3 = TOAST_FOREGROUND_COLOR,
ImageTransparency = 1,
}),
}),
create("Frame")({
Name = "TextBuffer",
BackgroundTransparency = 1,
BorderSizePixel = 0,
Position = UDim2.new(0, 80, 0, 0),
Size = UDim2.new(1, -80, 1, 0),
ClipsDescendants = true,
create("TextLabel")({
Name = "Upper",
AnchorPoint = Vector2.new(0, 1),
BackgroundTransparency = 1,
Position = UDim2.new(0, 0, 0.5, 0),
Size = UDim2.new(1, 0, 0, 19),
Font = Enum.Font.GothamSemibold,
Text = "Camera control enabled",
TextColor3 = TOAST_FOREGROUND_COLOR,
TextTransparency = 1,
TextSize = 19,
TextXAlignment = Enum.TextXAlignment.Left,
TextYAlignment = Enum.TextYAlignment.Center,
}),
create("TextLabel")({
Name = "Lower",
AnchorPoint = Vector2.new(0, 0),
BackgroundTransparency = 1,
Position = UDim2.new(0, 0, 0.5, 3),
Size = UDim2.new(1, 0, 0, 15),
Font = Enum.Font.Gotham,
Text = "Right mouse button to toggle",
TextColor3 = TOAST_FOREGROUND_COLOR,
TextTransparency = 1,
TextSize = 15,
TextXAlignment = Enum.TextXAlignment.Left,
TextYAlignment = Enum.TextYAlignment.Center,
}),
}),
}),
Parent = PlayerGui,
})
toast = uiRoot.Toast
toastIcon = toast.IconBuffer.Icon
toastUpperText = toast.TextBuffer.Upper
toastLowerText = toast.TextBuffer.Lower
initialized = true
end
local CameraUI = {}
do
-- Instantaneously disable the toast or enable for opening later on. Used when switching camera modes.
function CameraUI.setCameraModeToastEnabled(enabled)
if not enabled and not initialized then
return
end
if not initialized then
initializeUI()
end
toast.Visible = enabled
if not enabled then
CameraUI.setCameraModeToastOpen(false)
end
end
local tweenInfo = TweenInfo.new(0.25, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
-- Tween the toast in or out. Toast must be enabled with setCameraModeToastEnabled.
function CameraUI.setCameraModeToastOpen(open)
assert(initialized)
TweenService:Create(toast, tweenInfo, {
Size = open and TOAST_OPEN_SIZE or TOAST_CLOSED_SIZE,
ImageTransparency = open and TOAST_BACKGROUND_TRANS or 1,
}):Play()
TweenService:Create(toastIcon, tweenInfo, {
ImageTransparency = open and TOAST_FOREGROUND_TRANS or 1,
}):Play()
TweenService:Create(toastUpperText, tweenInfo, {
TextTransparency = open and TOAST_FOREGROUND_TRANS or 1,
}):Play()
TweenService:Create(toastLowerText, tweenInfo, {
TextTransparency = open and TOAST_FOREGROUND_TRANS or 1,
}):Play()
end
end
return CameraUI
|
local a={}function getSeats(R)for R,y in pairs(R:GetChildren())do if y:IsA("\086\101\104\105\099\108\101\083\101\097\116")or y:IsA("\083\101\097\116")then local R={}R.Seat=y R.Parts={}table.insert(a,R)end getSeats(y)end end getSeats(car)function getPProperties(a,R)for a,y in pairs(a:GetChildren())do if y:IsA("\066\097\115\101\080\097\114\116")then if y.CustomPhysicalProperties==nil then y.CustomPhysicalProperties=PhysicalProperties.new(y.Material)end table.insert(R,{y,y.CustomPhysicalProperties})y.CustomPhysicalProperties=PhysicalProperties.new(0,y.CustomPhysicalProperties.Friction,y.CustomPhysicalProperties.Elasticity,y.CustomPhysicalProperties.FrictionWeight,y.CustomPhysicalProperties.ElasticityWeight)end getPProperties(y,R)end end for a,R in pairs(a)do R.Seat.ChildAdded:connect(function(a)if a.Name=="\083\101\097\116\087\101\108\100"and(a:IsA("\087\101\108\100")and(a.Part1~=nil and(a.Part1.Parent~=workspace and not a.Part1.Parent:IsDescendantOf(car))))then R.Parts={}getPProperties(a.Part1.Parent,R.Parts)end end)R.Seat.ChildRemoved:connect(function(a)if a.Name=="\083\101\097\116\087\101\108\100"and a:IsA("\087\101\108\100")then for a,R in pairs(R.Parts)do if R[1]~=nil and(R[2]~=nil and R[1]:IsDescendantOf(workspace))then R[1].CustomPhysicalProperties=R[2]end end R.Parts={}end end)end | --[[Remove Character Weight]]
--Get Seats
local Seats = {}
function getSeats(p)
for i, v in pairs(p:GetChildren()) do
if v:IsA("VehicleSeat") or v:IsA("Seat") then
local seat = {}
seat.Seat = v
seat.Parts = {}
table.insert(Seats, seat)
end
getSeats(v)
end
end
getSeats(car)
--Store Physical Properties/Remove Mass Function
function getPProperties(mod, t)
for i, v in pairs(mod:GetChildren()) do
if v:IsA("BasePart") then
if v.CustomPhysicalProperties == nil then
v.CustomPhysicalProperties = PhysicalProperties.new(v.Material)
end
table.insert(t, { v, v.CustomPhysicalProperties })
v.CustomPhysicalProperties = PhysicalProperties.new(
0,
v.CustomPhysicalProperties.Friction,
v.CustomPhysicalProperties.Elasticity,
v.CustomPhysicalProperties.FrictionWeight,
v.CustomPhysicalProperties.ElasticityWeight
)
end
getPProperties(v, t)
end
end
--Apply Seat Handler
for i, v in pairs(Seats) do
--Sit Handler
v.Seat.ChildAdded:connect(function(child)
if
child.Name == "SeatWeld"
and child:IsA("Weld")
and child.Part1 ~= nil
and child.Part1.Parent ~= workspace
and not child.Part1.Parent:IsDescendantOf(car)
then
v.Parts = {}
getPProperties(child.Part1.Parent, v.Parts)
end
end)
--Leave Handler
v.Seat.ChildRemoved:connect(function(child)
if child.Name == "SeatWeld" and child:IsA("Weld") then
for i, v in pairs(v.Parts) do
if v[1] ~= nil and v[2] ~= nil and v[1]:IsDescendantOf(workspace) then
v[1].CustomPhysicalProperties = v[2]
end
end
v.Parts = {}
end
end)
end
|
local a=game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")local R=TweenInfo.new(2,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)local y=TweenInfo.new(4,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)local k={}local z={}local I={}local D=script.Parent.Parent.Parent.Parent script.Parent.Parent.Parent.Parent.Electrics.Changed:connect(function()if script.Parent.Parent.Parent.Parent.Electrics.Value==true then drlFade(true)else drlFade(false)end end)function drlFade(y)if y then z.Transparency=.8 local y=a:Create(D.Body.DRLs.DRL1,R,z)y:Play()else z.Transparency=1 local y=a:Create(D.Body.DRLs.DRL1,R,z)y:Play()end end I.drlFade=function(a)drlFade(a)end | --made by Bertox
--lul
local ts = game:GetService("TweenService")
local fadeDRL = TweenInfo.new(2, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut)
local fadeDRL2 = TweenInfo.new(4, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut)
local goal = {}
local goal2 = {}
local F = {}
local car = script.Parent.Parent.Parent.Parent
script.Parent.Parent.Parent.Parent.Electrics.Changed:connect(function()
if script.Parent.Parent.Parent.Parent.Electrics.Value == true then
drlFade(true)
else
drlFade(false)
end
end)
function drlFade(bool)
if bool then
goal2.Transparency = 0.8
local a = ts:Create(car.Body.DRLs.DRL1, fadeDRL, goal2)
a:Play()
else
goal2.Transparency = 1
local a = ts:Create(car.Body.DRLs.DRL1, fadeDRL, goal2)
a:Play()
end
end
F.drlFade = function(bool)
drlFade(bool)
end
|
local function a(a,R)return string.format("\037\048"..(R.."\105"),a)end local function R()local R=os.date("\033\042\116")local y,k,z=R.year,R.month,R.day local I,D,Y=R.hour,R.min,R.sec return y..("-"..(a(k,2)..("-"..(a(z,2)..("\084"..(a(I,2)..("\058"..(a(D,2)..("\058"..(a(Y,2).."\090"))))))))))end return R(DateTime) | --// Converts DateTime to ISO8601 timestamp
local function format(num, digits)
return string.format("%0" .. digits .. "i", num)
end
local function parseDateTime()
local osDate = os.date("!*t")
local year, mon, day = osDate["year"], osDate["month"], osDate["day"]
local hour, min, sec = osDate["hour"], osDate["min"], osDate["sec"]
return year
.. "-"
.. format(mon, 2)
.. "-"
.. format(day, 2)
.. "T"
.. format(hour, 2)
.. ":"
.. format(min, 2)
.. ":"
.. format(sec, 2)
.. "Z"
end
return parseDateTime(DateTime)
|
local a=script.Parent.Parent.SelEmoji local R=script.Parent local function y()if a.Visible then a:TweenSizeAndPosition(UDim2.new(0,0,0,0),UDim2.new(.822,0,.874,0),"\079\117\116","\081\117\097\100",.2,false,function()a.Visible=false end)else local R=UDim2.new(.822,0,.874,0)a.Position=R a.Size=UDim2.new(0,0,0,0)a.Visible=true a:TweenSizeAndPosition(UDim2.new(.864,0,.48,0),UDim2.new(.065,0,.259,0),"\079\117\116","\081\117\097\100",.2)end end | -- Get references to the DockShelf and its children
local fldr = script.Parent.Parent.SelEmoji
local btn = script.Parent
local function toggleWindow()
if fldr.Visible then
-- Close the window by tweening back to the button position and size
fldr:TweenSizeAndPosition(
UDim2.new(0, 0, 0, 0),
UDim2.new(0.822, 0, 0.874, 0),
"Out",
"Quad",
0.2,
false,
function()
fldr.Visible = false
end
)
else
-- Set the initial position of the window to be relative to the button
local startPos = UDim2.new(0.822, 0, 0.874, 0)
fldr.Position = startPos
-- Set the initial size of the window to be zero
fldr.Size = UDim2.new(0, 0, 0, 0)
-- Show the window and tween its position and size from the button position and size to its original position and size
fldr.Visible = true
fldr:TweenSizeAndPosition(UDim2.new(0.864, 0, 0.48, 0), UDim2.new(0.065, 0, 0.259, 0), "Out", "Quad", 0.2)
end
end
|
function SpringObject.Impulse(R,a)R._currentSpring:Impulse(SpringUtils.toLinearIfNeeded(a))R.Changed:Fire()end | --[=[
Impulses the spring, increasing velocity by the amount given. This is useful to make something shake,
like a Mac password box failing.
@param velocity T -- The velocity to impulse with
@return ()
]=]
function SpringObject:Impulse(velocity)
self._currentSpring:Impulse(SpringUtils.toLinearIfNeeded(velocity))
self.Changed:Fire()
end
|
script.Parent:WaitForChild("\083\112\101\101\100\111")script.Parent:WaitForChild("\084\097\099\104")script.Parent:WaitForChild("\108\110")script.Parent:WaitForChild("\071\101\097\114")script.Parent:WaitForChild("\083\112\101\101\100")local a=script.Parent.Parent.Car.Value a.DriveSeat.HeadsUpDisplay=false local R=require(a["\065-\067\104\097\115\115\105\115 \084\117\110\101"])local y=R.PeakRPM local k=R.Redline local z=math.ceil(k/1000)local I={}if R.Config=="\070\087\068"or R.Config=="\065\087\068"then if a.Wheels:FindFirstChild("\070\076")~=nil then table.insert(I,a.Wheels.FL)end if a.Wheels:FindFirstChild("\070\082")~=nil then table.insert(I,a.Wheels.FR)end if a.Wheels:FindFirstChild("\070")~=nil then table.insert(I,a.Wheels.F)end end if R.Config=="\082\087\068"or R.Config=="\065\087\068"then if a.Wheels:FindFirstChild("\082\076")~=nil then table.insert(I,a.Wheels.RL)end if a.Wheels:FindFirstChild("\082\082")~=nil then table.insert(I,a.Wheels.RR)end if a.Wheels:FindFirstChild("\082")~=nil then table.insert(I,a.Wheels.R)end end local D=0 for a,R in pairs(I)do if R.Size.x>D then D=R.Size.x end end I=nil local Y=math.ceil(((((D*math.pi)*k)/60)/R.Ratios[#R.Ratios])/R.FinalDrive)local f=math.max(math.ceil(Y/200)*20,20)for a=0,z*2,1 do local R=script.Parent.ln:clone()R.Parent=script.Parent.Tach R.Rotation=45+(a*225)/(z*2)R.Num.Text=a/2 R.Num.Rotation=-R.Rotation if a*500>=math.floor(y/500)*500 then R.Frame.BackgroundColor3=Color3.new(1,0,0)if a<z*2 then ln2=R:clone()ln2.Parent=script.Parent.Tach ln2.Rotation=45+((a+.5)*225)/(z*2)ln2.Num:Destroy()ln2.Visible=true end end if a%2==0 then R.Frame.Size=UDim2.new(0,3,0,10)R.Frame.Position=UDim2.new(0,-1,0,100)R.Num.Visible=true else R.Num:Destroy()end R.Visible=true end for a=1,90,1 do local R=script.Parent.ln:clone()R.Parent=script.Parent.Speedo R.Rotation=45+225*(a/90)if a%2==0 then R.Frame.Size=UDim2.new(0,2,0,10)R.Frame.Position=UDim2.new(0,-1,0,100)else R.Frame.Size=UDim2.new(0,3,0,5)end R.Num:Destroy()R.Visible=true end for a=0,Y,f do local R=script.Parent.ln:clone()R.Parent=script.Parent.Speedo R.Rotation=45+225*(a/Y)R.Num.Text=a R.Num.Rotation=-R.Rotation R.Frame:Destroy()R.Num.Visible=true R.Visible=true end if script.Parent.Parent.IsOn.Value then script.Parent:TweenPosition(UDim2.new(0,0,0,0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,1,true)end script.Parent.Parent.IsOn.Changed:connect(function()if script.Parent.Parent.IsOn.Value then script.Parent:TweenPosition(UDim2.new(0,0,0,0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,1,true)end end)script.Parent.Parent.Values.RPM.Changed:connect(function()script.Parent.Tach.Needle.Rotation=45+225*math.min(1,script.Parent.Parent.Values.RPM.Value/(z*1000))end)script.Parent.Parent.Values.Gear.Changed:connect(function()local a=script.Parent.Parent.Values.Gear.Value if a==0 then a="\078"elseif a==-1 then a="\082"end script.Parent.Gear.Text=a end)script.Parent.Parent.Values.TCS.Changed:connect(function()if script.Parent.Parent.Values.TCS.Value then script.Parent.TCS.TextColor3=Color3.new(1,.66666666666667,0)script.Parent.TCS.TextStrokeColor3=Color3.new(1,.66666666666667,0)if script.Parent.Parent.Values.TCSActive.Value then wait()script.Parent.TCS.Visible=not script.Parent.TCS.Visible else wait()script.Parent.TCS.Visible=false end else script.Parent.TCS.Visible=true script.Parent.TCS.TextColor3=Color3.new(1,0,0)script.Parent.TCS.TextStrokeColor3=Color3.new(1,0,0)end end)script.Parent.Parent.Values.TCSActive.Changed:connect(function()if script.Parent.Parent.Values.TCSActive.Value and script.Parent.Parent.Values.TCS.Value then wait()script.Parent.TCS.Visible=not script.Parent.TCS.Visible elseif not script.Parent.Parent.Values.TCS.Value then wait()script.Parent.TCS.Visible=true else wait()script.Parent.TCS.Visible=false end end)script.Parent.TCS.Changed:connect(function()if script.Parent.Parent.Values.TCSActive.Value and script.Parent.Parent.Values.TCS.Value then wait()script.Parent.TCS.Visible=not script.Parent.TCS.Visible elseif not script.Parent.Parent.Values.TCS.Value then wait()script.Parent.TCS.Visible=true end end)script.Parent.Parent.Values.PBrake.Changed:connect(function()script.Parent.PBrake.Visible=script.Parent.Parent.Values.PBrake.Value end)script.Parent.Parent.Values.TransmissionMode.Changed:connect(function()if script.Parent.Parent.Values.TransmissionMode.Value=="\065\117\116\111"then script.Parent.TMode.Text="\083\116\114\097\100\097"script.Parent.TMode.BackgroundColor3=Color3.new(1,.66666666666667,0)elseif script.Parent.Parent.Values.TransmissionMode.Value=="\083\101\109\105"then script.Parent.TMode.Text="\083\112\111\114\116"script.Parent.TMode.BackgroundColor3=Color3.new(0,.66666666666667,.49803921568627)else script.Parent.TMode.Text="\067\111\114\115\097"script.Parent.TMode.BackgroundColor3=Color3.new(1,.33333333333333,.5)end end)script.Parent.Parent.Values.Velocity.Changed:connect(function(a)script.Parent.Speedo.Needle.Rotation=45+225*math.min(1,script.Parent.Parent.Values.Velocity.Value.Magnitude/Y)script.Parent.Speed.Text=math.floor(script.Parent.Parent.Values.Velocity.Value.Magnitude).." \083\080\083"end) | --[[
___ _______ _
/ _ |____/ ___/ / ___ ____ ___ (_)__
/ __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
/_/ |_| \___/_//_/\_,_/___/___/_/___/
SecondLogic @ Inspare
]]
script.Parent:WaitForChild("Speedo")
script.Parent:WaitForChild("Tach")
script.Parent:WaitForChild("ln")
script.Parent:WaitForChild("Gear")
script.Parent:WaitForChild("Speed")
local car = script.Parent.Parent.Car.Value
car.DriveSeat.HeadsUpDisplay = false
local _Tune = require(car["A-Chassis Tune"])
local _pRPM = _Tune.PeakRPM
local _lRPM = _Tune.Redline
local revEnd = math.ceil(_lRPM / 1000)
local Drive = {}
if _Tune.Config == "FWD" or _Tune.Config == "AWD" then
if car.Wheels:FindFirstChild("FL") ~= nil then
table.insert(Drive, car.Wheels.FL)
end
if car.Wheels:FindFirstChild("FR") ~= nil then
table.insert(Drive, car.Wheels.FR)
end
if car.Wheels:FindFirstChild("F") ~= nil then
table.insert(Drive, car.Wheels.F)
end
end
if _Tune.Config == "RWD" or _Tune.Config == "AWD" then
if car.Wheels:FindFirstChild("RL") ~= nil then
table.insert(Drive, car.Wheels.RL)
end
if car.Wheels:FindFirstChild("RR") ~= nil then
table.insert(Drive, car.Wheels.RR)
end
if car.Wheels:FindFirstChild("R") ~= nil then
table.insert(Drive, car.Wheels.R)
end
end
local wDia = 0
for i, v in pairs(Drive) do
if v.Size.x > wDia then
wDia = v.Size.x
end
end
Drive = nil
local maxSpeed = math.ceil(wDia * math.pi * _lRPM / 60 / _Tune.Ratios[#_Tune.Ratios] / _Tune.FinalDrive)
local spInc = math.max(math.ceil(maxSpeed / 200) * 20, 20)
for i = 0, revEnd * 2 do
local ln = script.Parent.ln:clone()
ln.Parent = script.Parent.Tach
ln.Rotation = 45 + i * 225 / (revEnd * 2)
ln.Num.Text = i / 2
ln.Num.Rotation = -ln.Rotation
if i * 500 >= math.floor(_pRPM / 500) * 500 then
ln.Frame.BackgroundColor3 = Color3.new(1, 0, 0)
if i < revEnd * 2 then
ln2 = ln:clone()
ln2.Parent = script.Parent.Tach
ln2.Rotation = 45 + (i + 0.5) * 225 / (revEnd * 2)
ln2.Num:Destroy()
ln2.Visible = true
end
end
if i % 2 == 0 then
ln.Frame.Size = UDim2.new(0, 3, 0, 10)
ln.Frame.Position = UDim2.new(0, -1, 0, 100)
ln.Num.Visible = true
else
ln.Num:Destroy()
end
ln.Visible = true
end
for i = 1, 90 do
local ln = script.Parent.ln:clone()
ln.Parent = script.Parent.Speedo
ln.Rotation = 45 + 225 * (i / 90)
if i % 2 == 0 then
ln.Frame.Size = UDim2.new(0, 2, 0, 10)
ln.Frame.Position = UDim2.new(0, -1, 0, 100)
else
ln.Frame.Size = UDim2.new(0, 3, 0, 5)
end
ln.Num:Destroy()
ln.Visible = true
end
for i = 0, maxSpeed, spInc do
local ln = script.Parent.ln:clone()
ln.Parent = script.Parent.Speedo
ln.Rotation = 45 + 225 * (i / maxSpeed)
ln.Num.Text = i
ln.Num.Rotation = -ln.Rotation
ln.Frame:Destroy()
ln.Num.Visible = true
ln.Visible = true
end
if script.Parent.Parent.IsOn.Value then
script.Parent:TweenPosition(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, 1, true)
end
script.Parent.Parent.IsOn.Changed:connect(function()
if script.Parent.Parent.IsOn.Value then
script.Parent:TweenPosition(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, 1, true)
end
end)
script.Parent.Parent.Values.RPM.Changed:connect(function()
script.Parent.Tach.Needle.Rotation = 45 + 225 * math.min(1, script.Parent.Parent.Values.RPM.Value / (revEnd * 1000))
end)
script.Parent.Parent.Values.Gear.Changed:connect(function()
local gearText = script.Parent.Parent.Values.Gear.Value
if gearText == 0 then
gearText = "N"
elseif gearText == -1 then
gearText = "R"
end
script.Parent.Gear.Text = gearText
end)
script.Parent.Parent.Values.TCS.Changed:connect(function()
if script.Parent.Parent.Values.TCS.Value then
script.Parent.TCS.TextColor3 = Color3.new(1, 170 / 255, 0)
script.Parent.TCS.TextStrokeColor3 = Color3.new(1, 170 / 255, 0)
if script.Parent.Parent.Values.TCSActive.Value then
wait()
script.Parent.TCS.Visible = not script.Parent.TCS.Visible
else
wait()
script.Parent.TCS.Visible = false
end
else
script.Parent.TCS.Visible = true
script.Parent.TCS.TextColor3 = Color3.new(1, 0, 0)
script.Parent.TCS.TextStrokeColor3 = Color3.new(1, 0, 0)
end
end)
script.Parent.Parent.Values.TCSActive.Changed:connect(function()
if script.Parent.Parent.Values.TCSActive.Value and script.Parent.Parent.Values.TCS.Value then
wait()
script.Parent.TCS.Visible = not script.Parent.TCS.Visible
elseif not script.Parent.Parent.Values.TCS.Value then
wait()
script.Parent.TCS.Visible = true
else
wait()
script.Parent.TCS.Visible = false
end
end)
script.Parent.TCS.Changed:connect(function()
if script.Parent.Parent.Values.TCSActive.Value and script.Parent.Parent.Values.TCS.Value then
wait()
script.Parent.TCS.Visible = not script.Parent.TCS.Visible
elseif not script.Parent.Parent.Values.TCS.Value then
wait()
script.Parent.TCS.Visible = true
end
end)
script.Parent.Parent.Values.PBrake.Changed:connect(function()
script.Parent.PBrake.Visible = script.Parent.Parent.Values.PBrake.Value
end)
script.Parent.Parent.Values.TransmissionMode.Changed:connect(function()
if script.Parent.Parent.Values.TransmissionMode.Value == "Auto" then
script.Parent.TMode.Text = "Strada"
script.Parent.TMode.BackgroundColor3 = Color3.new(1, 170 / 255, 0)
elseif script.Parent.Parent.Values.TransmissionMode.Value == "Semi" then
script.Parent.TMode.Text = "Sport"
script.Parent.TMode.BackgroundColor3 = Color3.new(0, 170 / 255, 127 / 255)
else
script.Parent.TMode.Text = "Corsa"
script.Parent.TMode.BackgroundColor3 = Color3.new(1, 85 / 255, 0.5)
end
end)
script.Parent.Parent.Values.Velocity.Changed:connect(function(property)
script.Parent.Speedo.Needle.Rotation = 45
+ 225 * math.min(1, script.Parent.Parent.Values.Velocity.Value.Magnitude / maxSpeed)
script.Parent.Speed.Text = math.floor(script.Parent.Parent.Values.Velocity.Value.Magnitude) .. " SPS"
end)
|
local function a(a)if a.KeyCode==Enum.KeyCode.LeftShift then Running=true humanoid.WalkSpeed=30 while Running and Stamina2.MinValue>0 do Stamina2.MinValue-=2 wait(.01)end if Stamina2.MinValue<=20 then humanoid.WalkSpeed=16 end end end UIS.InputBegan:Connect(a) | -- Running --
local function Run(input)
if input.KeyCode == Enum.KeyCode.LeftShift then
Running = true
humanoid.WalkSpeed = 30
while Running and Stamina2.MinValue > 0 do
Stamina2.MinValue -= 2
wait(0.01)
end
if Stamina2.MinValue <= 20 then
humanoid.WalkSpeed = 16
end
end
end
UIS.InputBegan:Connect(Run)
|
function BaseOcclusion.CharacterAdded(y,a,R) end | -- Called when character is added
function BaseOcclusion:CharacterAdded(char, player) end
|
local a={}local R=require(game.ReplicatedStorage.Modules.Lightning)local y=require(game.ReplicatedStorage.Modules.Xeno)local k=require(game.ReplicatedStorage.Modules.CameraShaker)local z=game.TweenService local I=game.Debris local D=game.ReplicatedStorage function a.RunStompFx(a,R,y,k)local z=D.KillFX[a].Stomp:Clone()z.Parent=R.Parent.UpperTorso and R z:Play()game.Debris:AddItem(z,4)local I=D.KillFX[a].FX:Clone()I.Parent=workspace.Ignored.Animations I.PrimaryPart.CFrame=CFrame.new(R.Position)I.PrimaryPart.Sound:Play()game.Debris:AddItem(I,6)if y and y:FindFirstChild("\073\110\102\111\114\109\097\116\105\111\110")then for a,R in pairs(z:GetDescendants())do if R:IsA("\066\097\115\101\080\097\114\116")or R:IsA("\077\101\115\104\080\097\114\116")then R.Color=(y:FindFirstChild("\073\110\102\111\114\109\097\116\105\111\110")).RayColor.Value end end end for a,y in pairs(I:GetChildren())do local k=1200 if math.random(1,2)==2 then k=-1200 end;((game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")):Create(y,TweenInfo.new(4),{Transparency=1,Position=R.Position+Vector3.new(0,2,0);Size=y.Size+Vector3.new(200,200,200),Orientation=y.Orientation+Vector3.new(0,0,k)})):Play()end return nil end return a | -- Decompiled with the Synapse X Luau decompiler.
local v1 = {}
local v2 = require(game.ReplicatedStorage.Modules.Lightning)
local v3 = require(game.ReplicatedStorage.Modules.Xeno)
local v4 = require(game.ReplicatedStorage.Modules.CameraShaker)
local l__TweenService__5 = game.TweenService
local l__Debris__6 = game.Debris
local l__ReplicatedStorage__1 = game.ReplicatedStorage
function v1.RunStompFx(p1, p2, p3, p4)
local v7 = l__ReplicatedStorage__1.KillFX[p1].Stomp:Clone()
v7.Parent = p2.Parent.UpperTorso and p2
v7:Play()
game.Debris:AddItem(v7, 4)
local v8 = l__ReplicatedStorage__1.KillFX[p1].FX:Clone()
v8.Parent = workspace.Ignored.Animations
v8.PrimaryPart.CFrame = CFrame.new(p2.Position)
v8.PrimaryPart.Sound:Play()
game.Debris:AddItem(v8, 6)
if p3 and p3:FindFirstChild("Information") then
for v9, v10 in pairs(v7:GetDescendants()) do
if v10:IsA("BasePart") or v10:IsA("MeshPart") then
v10.Color = p3:FindFirstChild("Information").RayColor.Value
end
end
end
for v11, v12 in pairs(v8:GetChildren()) do
local v13 = 1200
if math.random(1, 2) == 2 then
v13 = -1200
end
game:GetService("TweenService")
:Create(v12, TweenInfo.new(4), {
Transparency = 1,
Position = p2.Position + Vector3.new(0, 2, 0),
Size = v12.Size + Vector3.new(200, 200, 200),
Orientation = v12.Orientation + Vector3.new(0, 0, v13),
})
:Play()
end
return nil
end
return v1
|
local a=true local R=script.Parent function onKeyDown(y)y:lower()if y=="\118"then if a==false then return end R.Melee:play()a=false local y=R.Parent["\082\105\103\104\116 \065\114\109"].RightGrip script.melee.Value=true for a=1,6,1 do y.C1=y.C1*CFrame.fromEulerAnglesXYZ(-0.55,0,0)wait()end wait(.25)for a=1,6,1 do y.C1=y.C1*CFrame.fromEulerAnglesXYZ(.55,0,0)wait()end script.melee.Value=false wait(.5)a=true end end function onSelect(a)a.KeyDown:connect(onKeyDown)end function blow(a)local R=a.Parent:findFirstChild("\072\117\109\097\110\111\105\100")if not R then return end local y=Tool.Parent local k=game.Players:playerFromCharacter(y)local z=y:findFirstChild("\072\117\109\097\110\111\105\100")if R~=z and(z~=nil and(game.Players:playerFromCharacter(R.Parent)and(game.Players:playerFromCharacter(R.Parent)).TeamColor~=cc))then tagHumanoid(R,k)R:TakeDamage(35)wait(1)untagHumanoid(R)end end R.Equipped:connect(onSelect) | --[[
Dax,
See the MeleeScript.
]]
local canmelee = true
local tool = script.Parent
function onKeyDown(key)
key:lower()
if key == "v" then
if canmelee == false then
return
end
tool.Melee:play()
canmelee = false
local rgrip = tool.Parent["Right Arm"].RightGrip
script.melee.Value = true
for i = 1, 6 do
rgrip.C1 = rgrip.C1 * CFrame.fromEulerAnglesXYZ(-0.55, 0, 0)
wait()
end
wait(0.25)
for i = 1, 6 do
rgrip.C1 = rgrip.C1 * CFrame.fromEulerAnglesXYZ(0.55, 0, 0)
wait()
end
script.melee.Value = false
wait(0.5)
canmelee = true
end
end
function onSelect(mouse)
mouse.KeyDown:connect(onKeyDown)
end
function blow(hit)
local humanoid = hit.Parent:findFirstChild("Humanoid")
if not humanoid then
return
end
local vCharacter = Tool.Parent
local vPlayer = game.Players:playerFromCharacter(vCharacter)
local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
if
humanoid ~= hum
and hum ~= nil
and game.Players:playerFromCharacter(humanoid.Parent)
and game.Players:playerFromCharacter(humanoid.Parent).TeamColor ~= cc
then
tagHumanoid(humanoid, vPlayer)
humanoid:TakeDamage(35)
wait(1)
untagHumanoid(humanoid)
end
end
tool.Equipped:connect(onSelect)
|
local a={}a.__index=a function a.new()local R=setmetatable({},a)R.cameras=require(script:WaitForChild("\067\097\109\101\114\097\077\111\100\117\108\101"))R.controls=require(script:WaitForChild("\067\111\110\116\114\111\108\077\111\100\117\108\101"))return R end function a.GetCameras(a)return a.cameras end function a.GetControls(a)return a.controls end return a.new() | -- Decompiled with the Synapse X Luau decompiler.
local v1 = {}
v1.__index = v1
function v1.new()
local v2 = setmetatable({}, v1)
v2.cameras = require(script:WaitForChild("CameraModule"))
v2.controls = require(script:WaitForChild("ControlModule"))
return v2
end
function v1.GetCameras(p1)
return p1.cameras
end
function v1.GetControls(p2)
return p2.controls
end
return v1.new()
|
AntiTK=false MouseSense=.5 CanAim=true CanBolt=true LaserAttached=true LightAttached=true TracerEnabled=true SprintSpeed=21 | -- Customization
AntiTK = false -- Set to false to allow TK and damaging of NPC, true for no TK. (To damage NPC, this needs to be false)
MouseSense = 0.5
CanAim = true -- Allows player to aim
CanBolt = true -- When shooting, if this is enabled, the bolt will move (SCAR-L, ACR, AK Series)
LaserAttached = true
LightAttached = true
TracerEnabled = true
SprintSpeed = 21
|
local a=script repeat Wait(0)until a and(a.Parent and(a.Parent.ClassName=="\077\111\100\101\108"and(a.Parent:FindFirstChild("\072\101\097\100")and a.Parent:FindFirstChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116"))))local R=a.Parent function raycast(a,y,k)local z,I=game.Workspace:FindPartOnRay(Ray.new(a+y*.05,y*k),R)if z~=nil and I then if z.Name=="\072\097\110\100\108\101"and not z.CanCollide or string.sub(z.Name,1,6)=="\069\102\102\101\099\116"and not z.CanCollide then local R=k-(I-a).magnitude return raycast(I,y,R)end end return z,I end function RayCast(a,R,y,k)return(Game:GetService("\087\111\114\107\115\112\097\099\101")):FindPartOnRayWithIgnoreList(Ray.new(a,R.unit*(y or 999.999)),k)end | --[[ By: Brutez. ]]
--
local JeffTheKillerScript = script
repeat
Wait(0)
until JeffTheKillerScript
and JeffTheKillerScript.Parent
and JeffTheKillerScript.Parent.ClassName == "Model"
and JeffTheKillerScript.Parent:FindFirstChild("Head")
and JeffTheKillerScript.Parent:FindFirstChild("HumanoidRootPart")
local JeffTheKiller = JeffTheKillerScript.Parent
function raycast(Spos, vec, currentdist)
local hit2, pos2 = game.Workspace:FindPartOnRay(Ray.new(Spos + (vec * 0.05), vec * currentdist), JeffTheKiller)
if hit2 ~= nil and pos2 then
if
hit2.Name == "Handle" and not hit2.CanCollide
or string.sub(hit2.Name, 1, 6) == "Effect" and not hit2.CanCollide
then
local currentdist = currentdist - (pos2 - Spos).magnitude
return raycast(pos2, vec, currentdist)
end
end
return hit2, pos2
end
function RayCast(Position, Direction, MaxDistance, IgnoreList)
return Game:GetService("Workspace")
:FindPartOnRayWithIgnoreList(Ray.new(Position, Direction.unit * (MaxDistance or 999.999)), IgnoreList)
end
|
function t.numberMinExclusive(a)return function(R)local y,k=t.number(R)if not y then return false,k or""end if a<R then return true else return false,string.format("\110\117\109\098\101\114 \062 \037\100 \101\120\112\101\099\116\101\100\044 \103\111\116 \037\100",a,R)end end end | --[[**
ensures value is a number where min < value
@param min The minimum to use
@returns A function that will return true iff the condition is passed
**--]]
function t.numberMinExclusive(min)
return function(value)
local success, errMsg = t.number(value)
if not success then
return false, errMsg or ""
end
if min < value then
return true
else
return false, string.format("number > %d expected, got %d", min, value)
end
end
end
|
local a=game:GetService("\080\108\097\121\101\114\115")local R=game:GetService("\082\117\110\083\101\114\118\105\099\101")local y={Climbing={SoundId="";Looped=true},Died={SoundId=""},FreeFalling={SoundId="";Looped=true},GettingUp={SoundId=""},Jumping={SoundId=""};Landing={SoundId=""};Running={SoundId="",Looped=true;Pitch=1.85};Splash={SoundId="\114\098\120\097\115\115\101\116\058\047\047\115\111\117\110\100\115\047\105\109\112\097\099\116\095\119\097\116\101\114\046\109\112\051"},Swimming={SoundId="\114\098\120\097\115\115\101\116\058\047\047\115\111\117\110\100\115\047\097\099\116\105\111\110\095\115\119\105\109\046\109\112\051";Looped=true;Pitch=1.6}}local function k(...)local a=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")local R={...}local function y(...)for a=1,#R,1 do R[a]:Disconnect()end return a:Fire(...)end for a=1,#R,1 do R[a]=R[a]:Connect(y)end return a.Event:Wait()end | -- Roblox character sound script
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local SOUND_DATA = {
Climbing = {
SoundId = "",
Looped = true,
},
Died = {
SoundId = "",
},
FreeFalling = {
SoundId = "",
Looped = true,
},
GettingUp = {
SoundId = "",
},
Jumping = {
SoundId = "",
},
Landing = {
SoundId = "",
},
Running = {
SoundId = "",
Looped = true,
Pitch = 1.85,
},
Splash = {
SoundId = "rbxasset://sounds/impact_water.mp3",
},
Swimming = {
SoundId = "rbxasset://sounds/action_swim.mp3",
Looped = true,
Pitch = 1.6,
},
}
-- wait for the first of the passed signals to fire
local function waitForFirst(...)
local shunt = Instance.new("BindableEvent")
local slots = { ... }
local function fire(...)
for i = 1, #slots do
slots[i]:Disconnect()
end
return shunt:Fire(...)
end
for i = 1, #slots do
slots[i] = slots[i]:Connect(fire)
end
return shunt.Event:Wait()
end
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.