input
stringlengths 6
11.4M
| output
stringlengths 6
4.94M
|
---|---|
game.Workspace.doorleft.l13.BrickColor=BrickColor.new(game.Workspace.Lighting.defaultlights.Value)game.Workspace.doorleft.l22.BrickColor=BrickColor.new(game.Workspace.Lighting.defaultlights.Value)game.Workspace.doorleft.l31.BrickColor=BrickColor.new(game.Workspace.Lighting.defaultlights.Value)game.Workspace.doorleft.l43.BrickColor=BrickColor.new(game.Workspace.Lighting.defaultlights.Value)game.Workspace.doorleft.l52.BrickColor=BrickColor.new(game.Workspace.Lighting.defaultlights.Value)game.Workspace.doorleft.l61.BrickColor=BrickColor.new(game.Workspace.Lighting.defaultlights.Value)game.Workspace.doorleft.l73.BrickColor=BrickColor.new(game.Workspace.Lighting.defaultlights.Value) | --------LEFT DOOR --------
game.Workspace.doorleft.l13.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l22.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l31.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l43.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l52.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l61.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l73.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
|
while true do while Humanoid.Health<Humanoid.MaxHealth do local A=wait(REGEN_STEP)local r=(A*REGEN_RATE)*Humanoid.MaxHealth Humanoid.Health=math.min(Humanoid.Health+r,Humanoid.MaxHealth)end Humanoid.HealthChanged:Wait()end | --------------------------------------------------------------------------------
while true do
while Humanoid.Health < Humanoid.MaxHealth do
local dt = wait(REGEN_STEP)
local dh = dt * REGEN_RATE * Humanoid.MaxHealth
Humanoid.Health = math.min(Humanoid.Health + dh, Humanoid.MaxHealth)
end
Humanoid.HealthChanged:Wait()
end
|
while(game:GetService("\082\117\110\083\101\114\118\105\099\101")).Heartbeat:wait()and(car:FindFirstChild("\068\114\105\118\101\083\101\097\116")and character.Humanoid.SeatPart==car.DriveSeat)do if IsGrounded()then if movement.Y~=0 then local A=(humanoidRootPart.CFrame.lookVector*movement.Y)*stats.Speed.Value humanoidRootPart.Velocity=humanoidRootPart.Velocity:Lerp(A,.1)bodyVelocity.maxForce=Vector3.new(0,0,0)else bodyVelocity.maxForce=Vector3.new(mass/2,mass/4,mass/2)end local A=humanoidRootPart.CFrame:vectorToWorldSpace(Vector3.new((movement.Y*stats.Speed.Value)/50,0,(-humanoidRootPart.RotVelocity.Y*5)*movement.Y))local r=-(humanoidRootPart.CFrame:vectorToObjectSpace(humanoidRootPart.Velocity)).unit.Z rotation=rotation+math.rad((-stats.Speed.Value/5)*movement.Y)if math.abs(r)>.1 then A=A+humanoidRootPart.CFrame:vectorToWorldSpace(Vector3.new(0,(-movement.X*r)*stats.TurnSpeed.Value,0))bodyAngularVelocity.maxTorque=Vector3.new(0,0,0)else bodyAngularVelocity.maxTorque=Vector3.new(mass/4,mass/2,mass/4)end humanoidRootPart.RotVelocity=humanoidRootPart.RotVelocity:Lerp(A,.1)else bodyVelocity.maxForce=Vector3.new(0,0,0)bodyAngularVelocity.maxTorque=Vector3.new(0,0,0)end for A,r in pairs(car:GetChildren())do if r.Name=="\084\104\114\117\115\116\101\114"then UpdateThruster(r)end end end for A,r in pairs(car:GetChildren())do if r:FindFirstChild("\066\111\100\121\084\104\114\117\115\116")then r.BodyThrust:Destroy()end end bodyVelocity:Destroy()bodyAngularVelocity:Destroy()script:Destroy() | --spawn(function()
while
game:GetService("RunService").Heartbeat:wait()
and car:FindFirstChild("DriveSeat")
and character.Humanoid.SeatPart == car.DriveSeat
do
--game:GetService("RunService").RenderStepped:wait()
if IsGrounded() then
if movement.Y ~= 0 then
local velocity = humanoidRootPart.CFrame.lookVector * movement.Y * stats.Speed.Value
humanoidRootPart.Velocity = humanoidRootPart.Velocity:Lerp(velocity, 0.1)
bodyVelocity.maxForce = Vector3.new(0, 0, 0)
else
bodyVelocity.maxForce = Vector3.new(mass / 2, mass / 4, mass / 2)
end
local rotVelocity = humanoidRootPart.CFrame:vectorToWorldSpace(
Vector3.new(movement.Y * stats.Speed.Value / 50, 0, -humanoidRootPart.RotVelocity.Y * 5 * movement.Y)
)
local speed = -humanoidRootPart.CFrame:vectorToObjectSpace(humanoidRootPart.Velocity).unit.Z
rotation = rotation + math.rad((-stats.Speed.Value / 5) * movement.Y)
if math.abs(speed) > 0.1 then
rotVelocity = rotVelocity
+ humanoidRootPart.CFrame:vectorToWorldSpace(
(Vector3.new(0, -movement.X * speed * stats.TurnSpeed.Value, 0))
)
bodyAngularVelocity.maxTorque = Vector3.new(0, 0, 0)
else
bodyAngularVelocity.maxTorque = Vector3.new(mass / 4, mass / 2, mass / 4)
end
humanoidRootPart.RotVelocity = humanoidRootPart.RotVelocity:Lerp(rotVelocity, 0.1)
--bodyVelocity.maxForce = Vector3.new(mass / 3, mass / 6, mass / 3)
--bodyAngularVelocity.maxTorque = Vector3.new(mass / 6, mass / 3, mass / 6)
else
bodyVelocity.maxForce = Vector3.new(0, 0, 0)
bodyAngularVelocity.maxTorque = Vector3.new(0, 0, 0)
end
for i, part in pairs(car:GetChildren()) do
if part.Name == "Thruster" then
UpdateThruster(part)
end
end
end
for i, v in pairs(car:GetChildren()) do
if v:FindFirstChild("BodyThrust") then
v.BodyThrust:Destroy()
end
end
bodyVelocity:Destroy()
bodyAngularVelocity:Destroy()
--camera.CameraType = oldCameraType
script:Destroy()
|
local function A(A)local r=A.Name local t=gui:FindFirstChild(r)if t then if t.Visible==false then for A,r in ipairs(gui:GetChildren())do if r:IsA("\070\114\097\109\101")and r.Visible then end end local A=UDim2.new(.0,0,.978,0)t.Position=A t.Size=UDim2.new(1,0,.022,0)t.Visible=true t:TweenSizeAndPosition(UDim2.new(1,0,.806,0),UDim2.new(0,0,.194,0),"\079\117\116","\081\117\097\100",.2)end end end | -- Define the function to open or close the window with gene-alike effect
local function toggleWindow(button)
local windowName = button.Name
-- Find the corresponding frame in the AppManager using the window name
local window = gui:FindFirstChild(windowName)
if window then
if window.Visible == false then
-- Close other windows
for _, child in ipairs(gui:GetChildren()) do
if child:IsA("Frame") and child.Visible then
end
end
local startPos = UDim2.new(0.0, 0, 0.978, 0)
window.Position = startPos
-- Set the initial size of the window to be zero
window.Size = UDim2.new(1, 0, 0.022, 0)
-- Show the window and tween its position and size from the button position and size to its original position and size
window.Visible = true
window:TweenSizeAndPosition(UDim2.new(1, 0, 0.806, 0), UDim2.new(0, 0, 0.194, 0), "Out", "Quad", 0.2)
end
end
end
|
RideHeightFront=1.4 RideHeightRear=1.4 StiffnessFront=3 StiffnessRear=4 AntiRollFront=2 AntiRollRear=3 CamberFront=-0.2 CamberRear=-1.3 | --//Suspension//--
RideHeightFront = 1.4 --{This value will increase the ride height for front}
RideHeightRear = 1.4 --{This value will increase the ride height for rear}
StiffnessFront = 3 --[0-10]{HIGHER STIFFNESS DECREASES SPAWNING STABILITY}
StiffnessRear = 4 --[0-10]{This value will increase the stiffness for rear} (S/A)
AntiRollFront = 2 --[0-10]{HIGHER STIFFNESS DECREASES SPAWNING STABILITY}
AntiRollRear = 3 --[0-10]{This value will reduce roll on the rear} (S/A)
CamberFront = -0.2 --[0-10]{Camber to the front in degrees}
CamberRear = -1.3 --[0-10]{Camber to the rear in degrees}
|
function Table.swapKeyValue(A)local r={}for A,t in pairs(A)do r[t]=A end return r end | --- Swaps keys with values, overwriting additional values if duplicated
-- @tparam table orig original table
-- @treturn table
function Table.swapKeyValue(orig)
local tab = {}
for key, val in pairs(orig) do
tab[val] = key
end
return tab
end
|
function ExternalEventConnection.render(A)return Roact.oneChild(A.props[Roact.Children])end function ExternalEventConnection.didMount(A)local r=A.props.event local t=A.props.callback A.connection=r:Connect(t)end function ExternalEventConnection.didUpdate(r,A)if r.props.event~=A.event or r.props.callback~=A.callback then r.connection:Disconnect()r.connection=r.props.event:Connect(r.props.callback)end end function ExternalEventConnection.willUnmount(A)A.connection:Disconnect()A.connection=nil end return ExternalEventConnection | --[[
Render the child component so that ExternalEventConnections can be nested like so:
Roact.createElement(ExternalEventConnection, {
event = UserInputService.InputBegan,
callback = inputBeganCallback,
}, {
Roact.createElement(ExternalEventConnection, {
event = UserInputService.InputEnded,
callback = inputChangedCallback,
})
})
]]
function ExternalEventConnection:render()
return Roact.oneChild(self.props[Roact.Children])
end
function ExternalEventConnection:didMount()
local event = self.props.event
local callback = self.props.callback
self.connection = event:Connect(callback)
end
function ExternalEventConnection:didUpdate(oldProps)
if self.props.event ~= oldProps.event or self.props.callback ~= oldProps.callback then
self.connection:Disconnect()
self.connection = self.props.event:Connect(self.props.callback)
end
end
function ExternalEventConnection:willUnmount()
self.connection:Disconnect()
self.connection = nil
end
return ExternalEventConnection
|
function ClientRemoteSignal.Connect(r,A)if r._directConnect then return r._re.OnClientEvent:Connect(A)else return r._signal:Connect(A)end end | --[=[
@param fn (...: any) -> any
@return Connection
Connects a function to the remote signal. The function will be
called anytime the equivalent server-side RemoteSignal is
fired at this specific client that created this client signal.
]=]
function ClientRemoteSignal:Connect(fn)
if self._directConnect then
return self._re.OnClientEvent:Connect(fn)
else
return self._signal:Connect(fn)
end
end
|
Tune.SteerInner=45 Tune.SteerOuter=41 Tune.SteerSpeed=.05 Tune.ReturnSpeed=.1 Tune.SteerDecay=320 Tune.MinSteer=10 Tune.MSteerExp=1 Tune.SteerD=1000 Tune.SteerMaxTorque=50000 Tune.SteerP=100000 | --[[Steering]]
Tune.SteerInner = 45 -- Inner wheel steering angle (in degrees)
Tune.SteerOuter = 41 -- Outer wheel steering angle (in degrees)
Tune.SteerSpeed = 0.05 -- Steering increment per tick (in degrees)
Tune.ReturnSpeed = 0.1 -- Steering increment per tick (in degrees)
Tune.SteerDecay = 320 -- Speed of gradient cutoff (in SPS)
Tune.MinSteer = 10 -- Minimum steering at max steer decay (in percent)
Tune.MSteerExp = 1 -- Mouse steering exponential degree
--Steer Gyro Tuning
Tune.SteerD = 1000 -- Steering Dampening
Tune.SteerMaxTorque = 50000 -- Steering Force
Tune.SteerP = 100000 -- Steering Aggressiveness
|
FADE_TIME,FADE_TWNSTYLE,FADE_TWNDIRECTION=nil IND_TICK_TIME=nil L_BEAM_COLOR,L_BEAM_RANGE,L_BEAM_BRIGHTNESS=nil H_BEAM_COLOR,H_BEAM_RANGE,H_BEAM_BRIGHTNESS=nil T_LIGHT_RANGE,T_LIGHT_BRIGHTNESS=nil B_LIGHT_RANGE,B_LIGHT_BRIGHTNESS,B_LIGHT_FADE_TIME=nil | --Miscellaneous Settings
FADE_TIME, FADE_TWNSTYLE, FADE_TWNDIRECTION = nil
IND_TICK_TIME = nil
L_BEAM_COLOR, L_BEAM_RANGE, L_BEAM_BRIGHTNESS = nil
H_BEAM_COLOR, H_BEAM_RANGE, H_BEAM_BRIGHTNESS = nil
T_LIGHT_RANGE, T_LIGHT_BRIGHTNESS = nil
B_LIGHT_RANGE, B_LIGHT_BRIGHTNESS, B_LIGHT_FADE_TIME = nil
|
Tune.Horsepower=600 Tune.IdleRPM=700 Tune.PeakRPM=6000 Tune.Redline=6700 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 = 600 -- [TORQUE CURVE VISUAL]
Tune.IdleRPM = 700 -- https://www.desmos.com/calculator/2uo3hqwdhf
Tune.PeakRPM = 6000 -- Use sliders to manipulate values
Tune.Redline = 6700 -- 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 Handler.add(r,A)assert(typeof(A)~="\073\110\115\116\097\110\099\101","\077\097\107\101 \115\117\114\101 \121\111\117 \097\114\101 \105\110\105\116\105\097\108\105\122\105\110\103 \102\114\111\109 \116\104\101 \082\097\121\099\097\115\116 \109\111\100\117\108\101\044 \110\111\116 \102\114\111\109 \116\104\105\115 \104\097\110\100\108\101\114\046")table.insert(ActiveHitboxes,A)end function Handler.remove(r,A)for r in ipairs(ActiveHitboxes)do if ActiveHitboxes[r].object==A then ActiveHitboxes[r]:Destroy()setmetatable(ActiveHitboxes[r],nil)table.remove(ActiveHitboxes,r)end end end function Handler.check(r,A)for r,t in ipairs(ActiveHitboxes)do if t.object==A then return t end end end function OnTagRemoved(A)Handler:remove(A)end;(CollectionService:GetInstanceRemovedSignal("\082\097\121\099\097\115\116\077\111\100\117\108\101\077\097\110\097\103\101\100")):Connect(OnTagRemoved) | --------
function Handler:add(hitboxObject)
assert(
typeof(hitboxObject) ~= "Instance",
"Make sure you are initializing from the Raycast module, not from this handler."
)
table.insert(ActiveHitboxes, hitboxObject)
end
function Handler:remove(object)
for i in ipairs(ActiveHitboxes) do
if ActiveHitboxes[i].object == object then
ActiveHitboxes[i]:Destroy()
setmetatable(ActiveHitboxes[i], nil)
table.remove(ActiveHitboxes, i)
end
end
end
function Handler:check(object)
for _, hitbox in ipairs(ActiveHitboxes) do
if hitbox.object == object then
return hitbox
end
end
end
function OnTagRemoved(object)
Handler:remove(object)
end
CollectionService:GetInstanceRemovedSignal("RaycastModuleManaged"):Connect(OnTagRemoved)
|
function Immutable.Append(A,...)local r={}local t=#A for t=1,t,1 do r[t]=A[t]end for A=1,select("\035",...),1 do r[t+A]=select(A,...)end return r end | --[[
Creates a new copy of the list with the given elements appended to it.
]]
function Immutable.Append(list, ...)
local new = {}
local len = #list
for key = 1, len do
new[key] = list[key]
end
for i = 1, select("#", ...) do
new[len + i] = select(i, ...)
end
return new
end
|
local A=script.Parent local r=true local t=game.ServerStorage.Floral A.Touched:Connect(function(B)if r==true then if B.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")then local h=game.Players:FindFirstChild(B.Parent.Name)if h then r=false A.BrickColor=BrickColor.new("\066\114\105\103\104\116 \114\101\100");(t:Clone()).Parent=h.Backpack wait(3)r=true A.BrickColor=BrickColor.new("\066\114\105\103\104\116 \103\114\101\101\110")end end end end) | --DO NOT CHANGE ANYTHING INSIDE OF THIS SCRIPT BESIDES WHAT YOU ARE TOLD TO UNLESS YOU KNOW WHAT YOU'RE DOING OR THE SCRIPT WILL NOT WORK!!
local hitPart = script.Parent
local debounce = true
local tool = game.ServerStorage.Floral -- Change "Sword" to the name of your tool, make sure your tool is in ServerStorage
hitPart.Touched:Connect(function(hit)
if debounce == true then
if hit.Parent:FindFirstChild("Humanoid") then
local plr = game.Players:FindFirstChild(hit.Parent.Name)
if plr then
debounce = false
hitPart.BrickColor = BrickColor.new("Bright red")
tool:Clone().Parent = plr.Backpack
wait(3) -- Change "3" to however long you want the player to have to wait before they can get the tool again
debounce = true
hitPart.BrickColor = BrickColor.new("Bright green")
end
end
end
end)
|
debounce=true function onTouched(A)if A.Parent:findFirstChild("\072\117\109\097\110\111\105\100")~=nil and debounce==true then debounce=false h=Instance.new("\072\097\116")p=Instance.new("\080\097\114\116")h.Name="\050\048\048\054 \086\105\115\111\114"p.Parent=h p.Position=(A.Parent:findFirstChild("\072\101\097\100")).Position p.Name="\072\097\110\100\108\101"p.formFactor=0 p.Size=Vector3.new(1,1,1)p.BottomSurface=0 p.TopSurface=0 p.Locked=true;(script.Parent.Mesh:clone()).Parent=p h.Parent=A.Parent h.AttachmentPos=Vector3.new(0,.09,.18)wait(5)debounce=true end end script.Parent.Touched:connect(onTouched) | -- (Hat Giver Script - Loaded.)
debounce = true
function onTouched(hit)
if hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true then
debounce = false
h = Instance.new("Hat")
p = Instance.new("Part")
h.Name = "2006 Visor"
p.Parent = h
p.Position = hit.Parent:findFirstChild("Head").Position
p.Name = "Handle"
p.formFactor = 0
p.Size = Vector3.new(1, 1, 1)
p.BottomSurface = 0
p.TopSurface = 0
p.Locked = true
script.Parent.Mesh:clone().Parent = p
h.Parent = hit.Parent
h.AttachmentPos = Vector3.new(0, 0.09, 0.18)
wait(5)
debounce = true
end
end
script.Parent.Touched:connect(onTouched)
|
local A=game.Players.LocalPlayer local r=A:GetMouse()local t=script.Parent.Parent.Car.Value local B=require(t["\065-\067\104\097\115\115\105\115 \084\117\110\101"])local h=script.Parent local I=script.Parent.Parent.Values local G=script.Parent.Parent.IsOn h:WaitForChild("\083\112\101\101\100\111")h:WaitForChild("\084\097\099\104")h:WaitForChild("\066\111\111\115\116")h:WaitForChild("\108\110")h:WaitForChild("\098\108\110")h:WaitForChild("\071\101\097\114")h:WaitForChild("\083\112\101\101\100")t.DriveSeat.HeadsUpDisplay=false local R=B.PeakRPM local v=B.Redline if not B.Engine and B.Electric then v=B.ElecRedline R=B.ElecTransition2 end local a=1 local H=math.ceil(v/1000) | -----------------------------------------------------------------------------------------------
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local car = script.Parent.Parent.Car.Value
local _Tune = require(car["A-Chassis Tune"])
local gauges = script.Parent
local values = script.Parent.Parent.Values
local isOn = script.Parent.Parent.IsOn
gauges:WaitForChild("Speedo")
gauges:WaitForChild("Tach")
gauges:WaitForChild("Boost")
gauges:WaitForChild("ln")
gauges:WaitForChild("bln")
gauges:WaitForChild("Gear")
gauges:WaitForChild("Speed")
car.DriveSeat.HeadsUpDisplay = false
local _pRPM = _Tune.PeakRPM
local _lRPM = _Tune.Redline
if not _Tune.Engine and _Tune.Electric then
_lRPM = _Tune.ElecRedline
_pRPM = _Tune.ElecTransition2
end
local currentUnits = 1
local revEnd = math.ceil(_lRPM / 1000)
|
for A,r in pairs(initData.Channels)do if r[1]==ChatSettings.GeneralChannelName then HandleChannelJoined(r[1],r[2],r[3],r[4],true,false)end end for A,r in pairs(initData.Channels)do if r[1]~=ChatSettings.GeneralChannelName then HandleChannelJoined(r[1],r[2],r[3],r[4],true,false)end end return moduleApiTable | -- Handle joining general channel first.
for i, channelData in pairs(initData.Channels) do
if channelData[1] == ChatSettings.GeneralChannelName then
HandleChannelJoined(channelData[1], channelData[2], channelData[3], channelData[4], true, false)
end
end
for i, channelData in pairs(initData.Channels) do
if channelData[1] ~= ChatSettings.GeneralChannelName then
HandleChannelJoined(channelData[1], channelData[2], channelData[3], channelData[4], true, false)
end
end
return moduleApiTable
|
function Path.new(A,r,t)if not(A and(A:IsA("\077\111\100\101\108")and A.PrimaryPart))then output(error,"\080\097\116\104\102\105\110\100\105\110\103 \097\103\101\110\116 \109\117\115\116 \098\101 \097 \118\097\108\105\100 \077\111\100\101\108 \073\110\115\116\097\110\099\101 \119\105\116\104 \097 \115\101\116 \080\114\105\109\097\114\121\080\097\114\116\046")end local B=setmetatable({_settings=t or DEFAULT_SETTINGS;_events={Reached=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116"),WaypointReached=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116");Blocked=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116");Error=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116"),Stopped=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")};_agent=A,_humanoid=A:FindFirstChildOfClass("\072\117\109\097\110\111\105\100");_path=PathfindingService:CreatePath(r),_status="\073\100\108\101",_t=0,_position={_last=Vector3.new();_count=0}},Path)for A,r in pairs(DEFAULT_SETTINGS)do B._settings[A]=B._settings[A]==nil and r or B._settings[A]end B._path.Blocked:Connect(function(...)if(B._currentWaypoint<=...and B._currentWaypoint+1>=...)and B._humanoid then setJumpState(B)B._events.Blocked:Fire(B._agent,B._waypoints[...])end end)return B end | --[[ CONSTRUCTOR ]]
--
function Path.new(agent, agentParameters, override)
if not (agent and agent:IsA("Model") and agent.PrimaryPart) then
output(error, "Pathfinding agent must be a valid Model Instance with a set PrimaryPart.")
end
local self = setmetatable({
_settings = override or DEFAULT_SETTINGS,
_events = {
Reached = Instance.new("BindableEvent"),
WaypointReached = Instance.new("BindableEvent"),
Blocked = Instance.new("BindableEvent"),
Error = Instance.new("BindableEvent"),
Stopped = Instance.new("BindableEvent"),
},
_agent = agent,
_humanoid = agent:FindFirstChildOfClass("Humanoid"),
_path = PathfindingService:CreatePath(agentParameters),
_status = "Idle",
_t = 0,
_position = {
_last = Vector3.new(),
_count = 0,
},
}, Path)
--Configure settings
for setting, value in pairs(DEFAULT_SETTINGS) do
self._settings[setting] = self._settings[setting] == nil and value or self._settings[setting]
end
--Path blocked connection
self._path.Blocked:Connect(function(...)
if (self._currentWaypoint <= ... and self._currentWaypoint + 1 >= ...) and self._humanoid then
setJumpState(self)
self._events.Blocked:Fire(self._agent, self._waypoints[...])
end
end)
return self
end
|
PlayersService.ChildRemoved:connect(OnPlayersChildRemoved)PlayersService.ChildAdded:connect(OnPlayersChildAdded)for A,r in pairs(PlayersService:GetPlayers())do OnPlayersChildAdded(r)end return PopperCam | -- Connect to all Players so we can ignore their Characters
PlayersService.ChildRemoved:connect(OnPlayersChildRemoved)
PlayersService.ChildAdded:connect(OnPlayersChildAdded)
for _, player in pairs(PlayersService:GetPlayers()) do
OnPlayersChildAdded(player)
end
return PopperCam
|
function ObservableSubscriptionTable.Observe(r,A)assert(A~=nil,"\066\097\100 \107\101\121")return Observable.new(function(t)if not r._subMap[A]then r._subMap[A]={t}else table.insert(r._subMap[A],t)end return function()if not r._subMap[A]then return end local B=r._subMap[A]local h=table.find(B,t)if not h then return end table.remove(B,h)if#B==0 then r._subMap[A]=nil end if t:IsPending()then task.spawn(function()t:Complete()end)end end end)end | --[=[
Observes for the key
@param key TKey
@return Observable<TEmit>
]=]
function ObservableSubscriptionTable:Observe(key)
assert(key ~= nil, "Bad key")
return Observable.new(function(sub)
if not self._subMap[key] then
self._subMap[key] = { sub }
else
table.insert(self._subMap[key], sub)
end
return function()
if not self._subMap[key] then
return
end
local current = self._subMap[key]
local index = table.find(current, sub)
if not index then
return
end
table.remove(current, index)
if #current == 0 then
self._subMap[key] = nil
end
-- Complete the subscription
if sub:IsPending() then
task.spawn(function()
sub:Complete()
end)
end
end
end)
end
|
local A=script.Parent A.Touched:Connect(function(A)local r=A.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")if r then r:TakeDamage(r.MaxHealth)end end) | -- This script works with any part, feel free to move it into a different part if needed.
local parentPart = script.Parent
parentPart.Touched:Connect(function(hit)
local human = hit.Parent:FindFirstChild("Humanoid")
if human then
human:TakeDamage(human.MaxHealth)
end
end)
|
function TranslationHelper.translateByKey(A,r)local t=""local B=false if foundPlayerTranslator then B=pcall(function()t=playerTranslator:FormatByKey(A,r)end)end if foundFallbackTranslator and not B then B=pcall(function()t=fallbackTranslator:FormatByKey(A,r)end)end if B then return t else return false end end return TranslationHelper | -- Create a FormatByKey() function that uses a fallback translator if the first fails to load or return successfully
function TranslationHelper.translateByKey(key, arguments)
local translation = ""
local foundTranslation = false
-- First tries to translate for the player's language (if a translator was found)
if foundPlayerTranslator then
foundTranslation = pcall(function()
translation = playerTranslator:FormatByKey(key, arguments)
end)
end
if foundFallbackTranslator and not foundTranslation then
foundTranslation = pcall(function()
translation = fallbackTranslator:FormatByKey(key, arguments)
end)
end
if foundTranslation then
return translation
else
return false
end
end
return TranslationHelper
|
local A=require(script:WaitForChild("\075\101\121\098\111\097\114\100"))local r=require(script:WaitForChild("\071\097\109\101\112\097\100"))local t=require(script:WaitForChild("\068\121\110\097\109\105\099\084\104\117\109\098\115\116\105\099\107"))local B do local A,r=pcall(function()return(UserSettings()):IsUserFeatureEnabled("\085\115\101\114\084\104\101\077\111\118\101\109\101\110\116\077\111\100\101\073\110\113\117\105\115\105\116\105\111\110")end)B=A and r end local h do local A,r=pcall(function()return(UserSettings()):IsUserFeatureEnabled("\085\115\101\114\077\097\107\101\084\104\117\109\098\115\116\105\099\107\068\121\110\097\109\105\099")end)h=A and r end local I=B and t or require(script:WaitForChild("\084\111\117\099\104\068\080\097\100"))local G=B and t or require(script:WaitForChild("\084\111\117\099\104\084\104\117\109\098\112\097\100"))local R=h and t or require(script:WaitForChild("\084\111\117\099\104\084\104\117\109\098\115\116\105\099\107")) | -- Roblox User Input Control Modules - each returns a new() constructor function used to create controllers as needed
local Keyboard = require(script:WaitForChild("Keyboard"))
local Gamepad = require(script:WaitForChild("Gamepad"))
local DynamicThumbstick = require(script:WaitForChild("DynamicThumbstick"))
local FFlagUserTheMovementModeInquisition
do
local success, value = pcall(function()
return UserSettings():IsUserFeatureEnabled("UserTheMovementModeInquisition")
end)
FFlagUserTheMovementModeInquisition = success and value
end
local FFlagUserMakeThumbstickDynamic
do
local success, value = pcall(function()
return UserSettings():IsUserFeatureEnabled("UserMakeThumbstickDynamic")
end)
FFlagUserMakeThumbstickDynamic = success and value
end
local TouchDPad = FFlagUserTheMovementModeInquisition and DynamicThumbstick or require(script:WaitForChild("TouchDPad"))
local TouchThumbpad = FFlagUserTheMovementModeInquisition and DynamicThumbstick
or require(script:WaitForChild("TouchThumbpad"))
local TouchThumbstick = FFlagUserMakeThumbstickDynamic and DynamicThumbstick
or require(script:WaitForChild("TouchThumbstick"))
|
Selection=Core.Selection Support=Core.Support Security=Core.Security Support.ImportServices() | -- Import relevant references
Selection = Core.Selection
Support = Core.Support
Security = Core.Security
Support.ImportServices()
|
function OnUnequipped()LeftButtonDown=false Reloading=false MyCharacter=nil MyHumanoid=nil MyTorso=nil MyPlayer=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 EquipTrack then EquipTrack:Stop()end if PumpTrack then PumpTrack:Stop()end end Tool.Equipped:connect(OnEquipped)Tool.Unequipped:connect(OnUnequipped) | -- Unequip logic here
function OnUnequipped()
LeftButtonDown = false
Reloading = false
MyCharacter = nil
MyHumanoid = nil
MyTorso = nil
MyPlayer = 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 EquipTrack then
EquipTrack:Stop()
end
if PumpTrack then
PumpTrack:Stop()
end
end
Tool.Equipped:connect(OnEquipped)
Tool.Unequipped:connect(OnUnequipped)
|
function luaK.getlabel(r,A)A.lasttarget=A.pc return A.pc end | ------------------------------------------------------------------------
-- returns current 'pc' and marks it as a jump target (to avoid wrong
-- optimizations with consecutive instructions not in the same basic block).
-- * used in multiple locations
-- * fs.lasttarget tested only by luaK:_nil() when optimizing OP_LOADNIL
------------------------------------------------------------------------
function luaK:getlabel(fs)
fs.lasttarget = fs.pc
return fs.pc
end
|
function Signal.new(A)local r=setmetatable({},Signal)if A then r.connectionsChanged=Signal.new()end r.connections={}r.totalConnections=0 r.waiting={}r.totalWaiting=0 return r end | -- CONSTRUCTOR
function Signal.new(createConnectionsChangedSignal)
local self = setmetatable({}, Signal)
if createConnectionsChangedSignal then
self.connectionsChanged = Signal.new()
end
self.connections = {}
self.totalConnections = 0
self.waiting = {}
self.totalWaiting = 0
return self
end
|
function RxLinkUtils.observeValidLinksBrio(A,r)assert(type(A)=="\115\116\114\105\110\103","\108\105\110\107\078\097\109\101 \115\104\111\117\108\100 \098\101 \'\115\116\114\105\110\103\'")assert(typeof(r)=="\073\110\115\116\097\110\099\101","\112\097\114\101\110\116 \115\104\111\117\108\100 \098\101 \'\073\110\115\116\097\110\099\101\'")return(RxInstanceUtils.observeChildrenBrio(r)):Pipe({Rx.flatMap(function(r)local t=r:GetValue()if not t:IsA("\079\098\106\101\099\116\086\097\108\117\101")then return Rx.EMPTY end return RxBrioUtils.completeOnDeath(r,RxLinkUtils.observeValidityBrio(A,t))end)})end | -- Emits valid links in format Brio.new(link, linkValue)
function RxLinkUtils.observeValidLinksBrio(linkName, parent)
assert(type(linkName) == "string", "linkName should be 'string'")
assert(typeof(parent) == "Instance", "parent should be 'Instance'")
return RxInstanceUtils.observeChildrenBrio(parent):Pipe({
Rx.flatMap(function(brio)
local instance = brio:GetValue()
if not instance:IsA("ObjectValue") then
return Rx.EMPTY
end
return RxBrioUtils.completeOnDeath(brio, RxLinkUtils.observeValidityBrio(linkName, instance))
end),
})
end
|
function VehicleLightsComponent.new(A)local r={model=A;state={headLights=false,brakeLights=false}}setmetatable(r,{__index=VehicleLightsComponent})r:setup()return r end | --[[
Creates a new controller associated with the specified vehicle.
]]
function VehicleLightsComponent.new(model)
local component = {
model = model,
state = {
headLights = false,
brakeLights = false,
},
}
setmetatable(component, { __index = VehicleLightsComponent })
component:setup()
return component
end
|
for A,r in pairs(script.Parent.ShopFrame.ButtonsFrame:GetChildren())do if r:IsA("\084\101\120\116\066\117\116\116\111\110")then r.MouseButton1Click:Connect(function()r.Parent.Visible=false script.Parent.ShopFrame.Boxes.Weapon.Value=r.Name script.Parent.ShopFrame.Boxes.Visible=true end)end end | ---Buttons
for _, v in pairs(script.Parent.ShopFrame.ButtonsFrame:GetChildren()) do
if v:IsA("TextButton") then
v.MouseButton1Click:Connect(function()
v.Parent.Visible = false
script.Parent.ShopFrame.Boxes.Weapon.Value = v.Name
script.Parent.ShopFrame.Boxes.Visible = true
end)
end
end
|
local A={}A.__index=A function A.AddChannel(t,A,r)if t.ChatChannels[A:lower()]then error(string.format("\067\104\097\110\110\101\108 \037\113 \097\108\114\097\100\121 \101\120\105\115\116\115\046",A))end local function B(r,B)if B:lower()=="\047\108\101\097\118\101"then local B=t:GetChannel(A)local h=t:GetSpeaker(r)if B and h then if B.Leavable then h:LeaveChannel(A)local r=ChatLocalization:FormatMessageToSend("\071\097\109\101\067\104\097\116\095\067\104\097\116\083\101\114\118\105\099\101\095\089\111\117\072\097\118\101\076\101\102\116\067\104\097\110\110\101\108",string.format("\089\111\117 \104\097\118\101 \108\101\102\116 \099\104\097\110\110\101\108 \'\037\115\'",A),"\082\066\088\095\078\065\077\069",A)h:SendSystemMessage(r,"\083\121\115\116\101\109")else h:SendSystemMessage(ChatLocalization:FormatMessageToSend("\071\097\109\101\067\104\097\116\095\067\104\097\116\083\101\114\118\105\099\101\095\067\097\110\110\111\116\076\101\097\118\101\067\104\097\110\110\101\108","\089\111\117 \099\097\110\110\111\116 \108\101\097\118\101 \116\104\105\115 \099\104\097\110\110\101\108\046"),A)end end return true end return false end local h=ChatChannel.new(t,A)t.ChatChannels[A:lower()]=h h:RegisterProcessCommandsFunction("\100\101\102\097\117\108\116\095\099\111\109\109\097\110\100\115",B,ChatConstants.HighPriority)local I,G=pcall(function()t.eChannelAdded:Fire(A)end)if not I and G then print("\069\114\114\111\114 \097\100\100\100\105\110\103 \099\104\097\110\110\101\108\058 "..G)end if r~=nil then h.AutoJoin=r if r then for r,t in pairs(t.Speakers)do t:JoinChannel(A)end end end return h end function A.RemoveChannel(r,A)if r.ChatChannels[A:lower()]then local t=r.ChatChannels[A:lower()].Name r.ChatChannels[A:lower()]:InternalDestroy()r.ChatChannels[A:lower()]=nil local B,h=pcall(function()r.eChannelRemoved:Fire(t)end)if not B and h then print("\069\114\114\111\114 \114\101\109\111\118\105\110\103 \099\104\097\110\110\101\108\058 "..h)end else warn(string.format("\067\104\097\110\110\101\108 \037\113 \100\111\101\115 \110\111\116 \101\120\105\115\116\046",A))end end function A.GetChannel(r,A)return r.ChatChannels[A:lower()]end function A.AddSpeaker(r,A)if r.Speakers[A:lower()]then error("\083\112\101\097\107\101\114 \""..(A.."\" \097\108\114\101\097\100\121 \101\120\105\115\116\115\033"))end local t=Speaker.new(r,A)r.Speakers[A:lower()]=t local B,h=pcall(function()r.eSpeakerAdded:Fire(A)end)if not B and h then print("\069\114\114\111\114 \097\100\100\105\110\103 \115\112\101\097\107\101\114\058 "..h)end return t end function A.InternalUnmuteSpeaker(r,A)for r,t in pairs(r.ChatChannels)do if t:IsSpeakerMuted(A)then t:UnmuteSpeaker(A)end end end function A.RemoveSpeaker(r,A)if r.Speakers[A:lower()]then local t=r.Speakers[A:lower()].Name r:InternalUnmuteSpeaker(t)r.Speakers[A:lower()]:InternalDestroy()r.Speakers[A:lower()]=nil local B,h=pcall(function()r.eSpeakerRemoved:Fire(t)end)if not B and h then print("\069\114\114\111\114 \114\101\109\111\118\105\110\103 \115\112\101\097\107\101\114\058 "..h)end else warn("\083\112\101\097\107\101\114 \""..(A.."\" \100\111\101\115 \110\111\116 \101\120\105\115\116\033"))end end function A.GetSpeaker(r,A)return r.Speakers[A:lower()]end function A.GetChannelList(A)local r={}for A,t in pairs(A.ChatChannels)do if not t.Private then table.insert(r,t.Name)end end return r end function A.GetAutoJoinChannelList(A)local r={}for A,t in pairs(A.ChatChannels)do if t.AutoJoin then table.insert(r,t)end end return r end function A.GetSpeakerList(A)local r={}for A,t in pairs(A.Speakers)do table.insert(r,t.Name)end return r end function A.SendGlobalSystemMessage(r,A)for r,t in pairs(r.Speakers)do t:SendSystemMessage(A,nil)end end function A.RegisterFilterMessageFunction(B,A,r,t)if B.FilterMessageFunctions:HasFunction(A)then error(string.format("\070\105\108\116\101\114\077\101\115\115\097\103\101\070\117\110\099\116\105\111\110 \'\037\115\' \097\108\114\101\097\100\121 \101\120\105\115\116\115",A))end B.FilterMessageFunctions:AddFunction(A,r,t)end function A.FilterMessageFunctionExists(r,A)return r.FilterMessageFunctions:HasFunction(A)end function A.UnregisterFilterMessageFunction(r,A)if not r.FilterMessageFunctions:HasFunction(A)then error(string.format("\070\105\108\116\101\114\077\101\115\115\097\103\101\070\117\110\099\116\105\111\110 \'\037\115\' \100\111\101\115 \110\111\116 \101\120\105\115\116\115",A))end r.FilterMessageFunctions:RemoveFunction(A)end function A.RegisterProcessCommandsFunction(B,A,r,t)if B.ProcessCommandsFunctions:HasFunction(A)then error(string.format("\080\114\111\099\101\115\115\067\111\109\109\097\110\100\115\070\117\110\099\116\105\111\110 \'\037\115\' \097\108\114\101\097\100\121 \101\120\105\115\116\115",A))end B.ProcessCommandsFunctions:AddFunction(A,r,t)end function A.ProcessCommandsFunctionExists(r,A)return r.ProcessCommandsFunctions:HasFunction(A)end function A.UnregisterProcessCommandsFunction(r,A)if not r.ProcessCommandsFunctions:HasFunction(A)then error(string.format("\080\114\111\099\101\115\115\067\111\109\109\097\110\100\115\070\117\110\099\116\105\111\110 \'\037\115\' \100\111\101\115 \110\111\116 \101\120\105\115\116",A))end r.ProcessCommandsFunctions:RemoveFunction(A)end local r=0 local t=0 local B=0 function A.InternalNotifyFilterIssue(A)if tick()-t>FILTER_THRESHOLD_TIME then B=0 end B=B+1 t=tick()if B>=FILTER_NOTIFCATION_THRESHOLD then if tick()-r>FILTER_NOTIFCATION_INTERVAL then r=tick()local t=A:GetChannel("\083\121\115\116\101\109")if t then t:SendSystemMessage(ChatLocalization:FormatMessageToSend("\071\097\109\101\067\104\097\116\095\067\104\097\116\083\101\114\118\105\099\101\095\067\104\097\116\070\105\108\116\101\114\073\115\115\117\101\115","\084\104\101 \099\104\097\116 \102\105\108\116\101\114 \105\115 \099\117\114\114\101\110\116\108\121 \101\120\112\101\114\105\101\110\099\105\110\103 \105\115\115\117\101\115 \097\110\100 \109\101\115\115\097\103\101\115 \109\097\121 \098\101 \115\108\111\119 \116\111 \097\112\112\101\097\114\046"),errorExtraData)end end end end local h={} | --////////////////////////////// Methods
--//////////////////////////////////////
local methods = {}
methods.__index = methods
function methods:AddChannel(channelName, autoJoin)
if self.ChatChannels[channelName:lower()] then
error(string.format("Channel %q alrady exists.", channelName))
end
local function DefaultChannelCommands(fromSpeaker, message)
if message:lower() == "/leave" then
local channel = self:GetChannel(channelName)
local speaker = self:GetSpeaker(fromSpeaker)
if channel and speaker then
if channel.Leavable then
speaker:LeaveChannel(channelName)
local msg = ChatLocalization:FormatMessageToSend(
"GameChat_ChatService_YouHaveLeftChannel",
string.format("You have left channel '%s'", channelName),
"RBX_NAME",
channelName
)
speaker:SendSystemMessage(msg, "System")
else
speaker:SendSystemMessage(
ChatLocalization:FormatMessageToSend(
"GameChat_ChatService_CannotLeaveChannel",
"You cannot leave this channel."
),
channelName
)
end
end
return true
end
return false
end
local channel = ChatChannel.new(self, channelName)
self.ChatChannels[channelName:lower()] = channel
channel:RegisterProcessCommandsFunction("default_commands", DefaultChannelCommands, ChatConstants.HighPriority)
local success, err = pcall(function()
self.eChannelAdded:Fire(channelName)
end)
if not success and err then
print("Error addding channel: " .. err)
end
if autoJoin ~= nil then
channel.AutoJoin = autoJoin
if autoJoin then
for _, speaker in pairs(self.Speakers) do
speaker:JoinChannel(channelName)
end
end
end
return channel
end
function methods:RemoveChannel(channelName)
if self.ChatChannels[channelName:lower()] then
local n = self.ChatChannels[channelName:lower()].Name
self.ChatChannels[channelName:lower()]:InternalDestroy()
self.ChatChannels[channelName:lower()] = nil
local success, err = pcall(function()
self.eChannelRemoved:Fire(n)
end)
if not success and err then
print("Error removing channel: " .. err)
end
else
warn(string.format("Channel %q does not exist.", channelName))
end
end
function methods:GetChannel(channelName)
return self.ChatChannels[channelName:lower()]
end
function methods:AddSpeaker(speakerName)
if self.Speakers[speakerName:lower()] then
error('Speaker "' .. speakerName .. '" already exists!')
end
local speaker = Speaker.new(self, speakerName)
self.Speakers[speakerName:lower()] = speaker
local success, err = pcall(function()
self.eSpeakerAdded:Fire(speakerName)
end)
if not success and err then
print("Error adding speaker: " .. err)
end
return speaker
end
function methods:InternalUnmuteSpeaker(speakerName)
for channelName, channel in pairs(self.ChatChannels) do
if channel:IsSpeakerMuted(speakerName) then
channel:UnmuteSpeaker(speakerName)
end
end
end
function methods:RemoveSpeaker(speakerName)
if self.Speakers[speakerName:lower()] then
local n = self.Speakers[speakerName:lower()].Name
self:InternalUnmuteSpeaker(n)
self.Speakers[speakerName:lower()]:InternalDestroy()
self.Speakers[speakerName:lower()] = nil
local success, err = pcall(function()
self.eSpeakerRemoved:Fire(n)
end)
if not success and err then
print("Error removing speaker: " .. err)
end
else
warn('Speaker "' .. speakerName .. '" does not exist!')
end
end
function methods:GetSpeaker(speakerName)
return self.Speakers[speakerName:lower()]
end
function methods:GetChannelList()
local list = {}
for i, channel in pairs(self.ChatChannels) do
if not channel.Private then
table.insert(list, channel.Name)
end
end
return list
end
function methods:GetAutoJoinChannelList()
local list = {}
for i, channel in pairs(self.ChatChannels) do
if channel.AutoJoin then
table.insert(list, channel)
end
end
return list
end
function methods:GetSpeakerList()
local list = {}
for i, speaker in pairs(self.Speakers) do
table.insert(list, speaker.Name)
end
return list
end
function methods:SendGlobalSystemMessage(message)
for i, speaker in pairs(self.Speakers) do
speaker:SendSystemMessage(message, nil)
end
end
function methods:RegisterFilterMessageFunction(funcId, func, priority)
if self.FilterMessageFunctions:HasFunction(funcId) then
error(string.format("FilterMessageFunction '%s' already exists", funcId))
end
self.FilterMessageFunctions:AddFunction(funcId, func, priority)
end
function methods:FilterMessageFunctionExists(funcId)
return self.FilterMessageFunctions:HasFunction(funcId)
end
function methods:UnregisterFilterMessageFunction(funcId)
if not self.FilterMessageFunctions:HasFunction(funcId) then
error(string.format("FilterMessageFunction '%s' does not exists", funcId))
end
self.FilterMessageFunctions:RemoveFunction(funcId)
end
function methods:RegisterProcessCommandsFunction(funcId, func, priority)
if self.ProcessCommandsFunctions:HasFunction(funcId) then
error(string.format("ProcessCommandsFunction '%s' already exists", funcId))
end
self.ProcessCommandsFunctions:AddFunction(funcId, func, priority)
end
function methods:ProcessCommandsFunctionExists(funcId)
return self.ProcessCommandsFunctions:HasFunction(funcId)
end
function methods:UnregisterProcessCommandsFunction(funcId)
if not self.ProcessCommandsFunctions:HasFunction(funcId) then
error(string.format("ProcessCommandsFunction '%s' does not exist", funcId))
end
self.ProcessCommandsFunctions:RemoveFunction(funcId)
end
local LastFilterNoficationTime = 0
local LastFilterIssueTime = 0
local FilterIssueCount = 0
function methods:InternalNotifyFilterIssue()
if (tick() - LastFilterIssueTime) > FILTER_THRESHOLD_TIME then
FilterIssueCount = 0
end
FilterIssueCount = FilterIssueCount + 1
LastFilterIssueTime = tick()
if FilterIssueCount >= FILTER_NOTIFCATION_THRESHOLD then
if (tick() - LastFilterNoficationTime) > FILTER_NOTIFCATION_INTERVAL then
LastFilterNoficationTime = tick()
local systemChannel = self:GetChannel("System")
if systemChannel then
systemChannel:SendSystemMessage(
ChatLocalization:FormatMessageToSend(
"GameChat_ChatService_ChatFilterIssues",
"The chat filter is currently experiencing issues and messages may be slow to appear."
),
errorExtraData
)
end
end
end
end
local StudioMessageFilteredCache = {}
|
local A=_G.HDAdminMain local r={Phone=1;Tablet=.8,Computer=.6}local t={[A.gui.MainFrame]=.78;[A.gui.MenuTemplates.Template5]=.78;[A.gui.MenuTemplates.Template6]=.78,[A.gui.MenuTemplates.Template7]=.78;[A.gui.MenuTemplates.Template9]=.78,[A.gui.MenuTemplates.Template10]=1.17;[A.gui.MenuTemplates.Template11]=1.17,[A.gui.MenuTemplates.Template12]=.78}local B=0 local function h()local B=r.Computer if A.device=="\077\111\098\105\108\101"then if A.tablet then B=r.Tablet else B=r.Phone end end for A,r in pairs(t)do local t=B if r>1 then t=B/1.5 end A.Position=UDim2.new(0,0,(1-t)/2,0)A.Size=UDim2.new(0,0,t,0)local h=A.AbsoluteSize.Y*r A.Position=UDim2.new(.5,-h/2,A.Position.Y.Scale,A.Position.Y.Offset)A.Size=UDim2.new(0,h,A.Size.Y.Scale,A.Size.Y.Offset)end end local function I()B=B+1 wait(.5)B=B-1 if B==0 then h();(A:GetModule("\080\097\103\101\065\098\111\117\116")):CreateCredits()end end A.gui.Changed:Connect(function(A)if A=="\065\098\115\111\108\117\116\101\083\105\122\101"then I()end end)h()return{} | -- Decompiled with the Synapse X Luau decompiler.
local l__HDAdminMain__1 = _G.HDAdminMain
local u1 = {
Phone = 1,
Tablet = 0.8,
Computer = 0.6,
}
local u2 = {
[l__HDAdminMain__1.gui.MainFrame] = 0.78,
[l__HDAdminMain__1.gui.MenuTemplates.Template5] = 0.78,
[l__HDAdminMain__1.gui.MenuTemplates.Template6] = 0.78,
[l__HDAdminMain__1.gui.MenuTemplates.Template7] = 0.78,
[l__HDAdminMain__1.gui.MenuTemplates.Template9] = 0.78,
[l__HDAdminMain__1.gui.MenuTemplates.Template10] = 1.17,
[l__HDAdminMain__1.gui.MenuTemplates.Template11] = 1.17,
[l__HDAdminMain__1.gui.MenuTemplates.Template12] = 0.78,
}
local u3 = 0
local function u4()
local v2 = u1.Computer
if l__HDAdminMain__1.device == "Mobile" then
if l__HDAdminMain__1.tablet then
v2 = u1.Tablet
else
v2 = u1.Phone
end
end
for v3, v4 in pairs(u2) do
local v5 = v2
if v4 > 1 then
v5 = v2 / 1.5
end
v3.Position = UDim2.new(0, 0, (1 - v5) / 2, 0)
v3.Size = UDim2.new(0, 0, v5, 0)
local v6 = v3.AbsoluteSize.Y * v4
v3.Position = UDim2.new(0.5, -v6 / 2, v3.Position.Y.Scale, v3.Position.Y.Offset)
v3.Size = UDim2.new(0, v6, v3.Size.Y.Scale, v3.Size.Y.Offset)
end
end
local function u5()
u3 = u3 + 1
wait(0.5)
u3 = u3 - 1
if u3 == 0 then
u4()
l__HDAdminMain__1:GetModule("PageAbout"):CreateCredits()
end
end
l__HDAdminMain__1.gui.Changed:Connect(function(p1)
if p1 == "AbsoluteSize" then
u5()
end
end)
u4()
return {}
|
MarketplaceService=Game:GetService("\077\097\114\107\101\116\112\108\097\099\101\083\101\114\118\105\099\101")MarketplaceService.ProcessReceipt=function(A)players=game.Players:GetPlayers()currency="\083\116\097\103\101"done=0 for r=1,#players,1 do if players[r].userId==A.PlayerId then if A.ProductId==940704785 and done==0 then done=1 players[r].leaderstats[currency].Value=players[r].leaderstats[currency].Value+1 players[r].Character.Humanoid.Health=0 done=0 end end end return Enum.ProductPurchaseDecision.PurchaseGranted end | --skip stage product id: 940704785
MarketplaceService = Game:GetService("MarketplaceService")
MarketplaceService.ProcessReceipt = function(receiptInfo)
players = game.Players:GetPlayers()
currency = "Stage"
done = 0
for i = 1, #players do
if players[i].userId == receiptInfo.PlayerId then
if receiptInfo.ProductId == 940704785 and done == 0 then
done = 1
players[i].leaderstats[currency].Value = players[i].leaderstats[currency].Value + 1
players[i].Character.Humanoid.Health = 0
done = 0
end
end
end
return Enum.ProductPurchaseDecision.PurchaseGranted
end
|
function waitForChild(A,r)while not A:FindFirstChild(r)do A.ChildAdded:wait()end end local A=script.Parent local r=3 local t=CFrame.new()+Vector3.new(0,-1.1,.55)local B=CFrame.new()+Vector3.new(0,-1.1,-0.55)waitForChild(A,"\080\108\097\121\101\114\073\100\084\097\103")waitForChild(A,"\067\111\110\102\105\103\117\114\097\116\105\111\110")waitForChild(A,"\068\111\111\114\049")waitForChild(A,"\068\111\111\114\050")waitForChild(A,"\084\111\117\099\104\068\111\111\114\049")waitForChild(A,"\084\111\117\099\104\068\111\111\114\050")waitForChild(A,"\079\117\116\101\114\069\100\103\101")local h=A.PlayerIdTag.Value local I=A.Configuration local G=A.Door1 local R=A.Door2 local v=A.TouchDoor1 local a=A.TouchDoor2 local H=A.OuterEdge waitForChild(I,"\070\114\105\101\110\100\077\111\100\101")local V=I.FriendMode function testPermission(r)h=A.PlayerIdTag.Value if r==nil then return false end pChar=r.Parent if pChar==nil then return false end pPlay=game.Players:GetPlayerFromCharacter(pChar)if pPlay==nil then return false end if V.Value=="\069\118\101\114\121\111\110\101"then return true elseif V.Value=="\079\110\108\121 \077\101"then if pPlay.userId==h then return true else end elseif V.Value=="\070\114\105\101\110\100\115"then if pPlay:IsFriendsWith(h)then return true else end elseif V.Value=="\066\101\115\116 \070\114\105\101\110\100\115"then if pPlay:IsBestFriendsWith(h)then return true else end elseif V.Value=="\071\114\111\117\112"then if pPlay:IsInGroup(h)then return true else end end return false end local g function doorOpen()g=true weld1=G:FindFirstChild("\068\111\111\114\087\101\108\100")weld2=R:FindFirstChild("\068\111\111\114\087\101\108\100")if not weld1 or not weld2 then return end for A=1,10,1 do weld1.C1=t+Vector3.new(0,0,A*.2)weld2.C1=B+Vector3.new(0,0,A*-0.2)wait(.1)end end function doorClose()weld1=G:FindFirstChild("\068\111\111\114\087\101\108\100")weld2=R:FindFirstChild("\068\111\111\114\087\101\108\100")if not weld1 or not weld2 then return end for A=9,0,-1 do weld1.C1=t+Vector3.new(0,0,A*.2)weld2.C1=B+Vector3.new(0,0,A*-0.2)wait(.1)end g=false end local L=false local T=0 function touchEvent(t)if not t or not t.Parent or t.Parent==A then return end if testPermission(t)then if not L and not g then L=true doorOpen()wait(r)while T>0 do local A=T T=0 wait(A)end doorClose()L=false else T=r end end end function changedEvent(A)if A~="\067\070\114\097\109\101"then return end end changedEvent("\067\070\114\097\109\101") | -- useless comment here
function waitForChild(parent, child)
while not parent:FindFirstChild(child) do
parent.ChildAdded:wait()
end
end
local model = script.Parent
local doorOpenTime = 3
local weld1RelativePosition = CFrame.new() + Vector3.new(0, -1.1, 0.55)
local weld2RelativePosition = CFrame.new() + Vector3.new(0, -1.1, -0.55)
waitForChild(model, "PlayerIdTag")
waitForChild(model, "Configuration")
waitForChild(model, "Door1")
waitForChild(model, "Door2")
waitForChild(model, "TouchDoor1")
waitForChild(model, "TouchDoor2")
waitForChild(model, "OuterEdge")
local doorOwnerId = model.PlayerIdTag.Value -- Update the owner ID
local config = model.Configuration
local doorPart1 = model.Door1
local doorPart2 = model.Door2
local doorTouch1 = model.TouchDoor1
local doorTouch2 = model.TouchDoor2
local outerEdge = model.OuterEdge
waitForChild(config, "FriendMode")
local mode = config.FriendMode
function testPermission(part)
doorOwnerId = model.PlayerIdTag.Value -- Update the owner ID
if part == nil then
return false
end -- In case part was deleted
pChar = part.Parent
if pChar == nil then
return false
end
pPlay = game.Players:GetPlayerFromCharacter(pChar) -- In case player left game
if pPlay == nil then
return false
end
-- Test permissions
if mode.Value == "Everyone" then
return true
elseif mode.Value == "Only Me" then
if pPlay.userId == doorOwnerId then
return true
else
-- no access
end
elseif mode.Value == "Friends" then
if pPlay:IsFriendsWith(doorOwnerId) then
return true
else
-- no access
end
elseif mode.Value == "Best Friends" then
if pPlay:IsBestFriendsWith(doorOwnerId) then
return true
else
-- no access
end
elseif mode.Value == "Group" then
if pPlay:IsInGroup(doorOwnerId) then
return true
else
-- no access
end
end
return false
end
local isOpen
function doorOpen()
isOpen = true
--if doorPart1:FindFirstChild("DoorWeld") ~= nil then doorPart1.DoorWeld:Remove() end
--if doorPart2:FindFirstChild("DoorWeld") ~= nil then doorPart2.DoorWeld:Remove() end
weld1 = doorPart1:FindFirstChild("DoorWeld")
weld2 = doorPart2:FindFirstChild("DoorWeld")
if not weld1 or not weld2 then
return
end
-- horrible animation code
for i = 1, 10 do
weld1.C1 = weld1RelativePosition + Vector3.new(0, 0, i * 0.2)
weld2.C1 = weld2RelativePosition + Vector3.new(0, 0, i * -0.2)
wait(0.1)
end
end
function doorClose()
-- horrible animation code
weld1 = doorPart1:FindFirstChild("DoorWeld")
weld2 = doorPart2:FindFirstChild("DoorWeld")
if not weld1 or not weld2 then
return
end
for i = 9, 0, -1 do
weld1.C1 = weld1RelativePosition + Vector3.new(0, 0, i * 0.2)
weld2.C1 = weld2RelativePosition + Vector3.new(0, 0, i * -0.2)
wait(0.1)
end
isOpen = false
--doorPart2.CFrame = doorGyro.cframe -- snap shut through the player, so that it doesn't send them flying
end
local debounce = false
local stayOpenTime = 0
function touchEvent(part)
if not part or not part.Parent or part.Parent == model then
return
end
--if (part ~= door1 and part ~= door2) then
if testPermission(part) then
if not debounce and not isOpen then
debounce = true
doorOpen()
wait(doorOpenTime)
while stayOpenTime > 0 do
local tempVariable = stayOpenTime -- allows us to use this variable in the wait while also setting it to zero
stayOpenTime = 0
wait(tempVariable)
end
doorClose()
debounce = false
else
stayOpenTime = doorOpenTime
end
end
--end
end
function changedEvent(prop)
-- Only interested in CFrame (position + rotation) changes
if prop ~= "CFrame" then
return
end
--targetPos = underDoors.Position
--door1bp.position = side2.Position
--door2bp.position = side1.Position
--a = underDoors.CFrame.lookVector
--lookVector = Vector3.new( math.abs(a.x), math.abs(a.y), math.abs(a.z) )
--setDoorForces()
end
changedEvent("CFrame") -- Fire once to initialize
|
Firerate=.083333333333333 FireMode=1 | --// Handling Settings
Firerate = 60 / 720 -- 60 = 1 Minute, 700 = Rounds per that 60 seconds. DO NOT TOUCH THE 60!
FireMode = 1 -- 1 = Semi, 2 = Auto, 3 = Burst, 4 = Bolt Action, 5 = Shot, 6 = Explosive
|
sp=script.Parent local A=sp:WaitForChild("\066\111\100\121\086\101\108\111\099\105\116\121")wait(.5+math.random())A.velocity=A.velocity*Vector3.new(1,0,1)for r=1,100,1 do A.velocity=A.velocity+Vector3.new(math.random()-.5,math.random()-.5,math.random()-.5)*5 wait(.5+math.random())end sp:Destroy() | --Stickmasterluke
sp = script.Parent
local bv = sp:WaitForChild("BodyVelocity")
wait(0.5 + math.random())
bv.velocity = bv.velocity * Vector3.new(1, 0, 1)
for _ = 1, 100 do
bv.velocity = bv.velocity + Vector3.new(math.random() - 0.5, math.random() - 0.5, math.random() - 0.5) * 5
wait(0.5 + math.random())
end
sp:Destroy()
|
for A,r in pairs(script.Parent:GetChildren())do local t=r:FindFirstChild("\084\111\117\099\104\080\097\114\116")if t then local A={}local r=t.Color local B=t.Particles t.Touched:Connect(function(h)local I=h.Parent local G=players:GetPlayerFromCharacter(I)if G and not A[G]then A[G]=true local h,R,v=hd:GetRank(G)local a=errorColor if h<rankId then hd:SetRank(G,rankId,rankType)a=successColor else local A="\089\111\117\114 \114\097\110\107 \105\115 \097\108\114\101\097\100\121 \104\105\103\104\101\114 \116\104\097\110 \'"..(rankName.."\'\033")if h==rankId then A="\089\111\117\'\118\101 \097\108\114\101\097\100\121 \098\101\101\110 \114\097\110\107\101\100 \116\111 \'"..(rankName.."\'\033")end hd:Error(G,A)end t.Color=a if a==successColor then local A=I:FindFirstChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")if A and B then local r=B:Clone()debris:AddItem(r,3)r.Parent=A for A,r in pairs(r:GetChildren())do r:Emit(2)end end end local H=tweenService:Create(t,TweenInfo.new(2),{Color=r})H:Play()H.Completed:Wait()A[G]=false end end)end end | -- << MAIN >>
--Touch Pad
for a, b in pairs(script.Parent:GetChildren()) do
local touchPart = b:FindFirstChild("TouchPart")
if touchPart then
local touchDe = {}
local originalColor = touchPart.Color
local particles = touchPart.Particles
touchPart.Touched:Connect(function(hit)
local character = hit.Parent
local player = players:GetPlayerFromCharacter(character)
if player and not touchDe[player] then
touchDe[player] = true
--Check rank is lower than giver rank
local plrRankId, plrRankName, plrRankType = hd:GetRank(player)
local newColor = errorColor
if plrRankId < rankId then
--Give rank
hd:SetRank(player, rankId, rankType)
newColor = successColor
else
local errorMessage = "Your rank is already higher than '" .. rankName .. "'!"
if plrRankId == rankId then
errorMessage = "You've already been ranked to '" .. rankName .. "'!"
end
hd:Error(player, errorMessage)
end
--Change pad color
touchPart.Color = newColor
--Success effect
if newColor == successColor then
local hrp = character:FindFirstChild("HumanoidRootPart")
if hrp and particles then
local particlesClone = particles:Clone()
debris:AddItem(particlesClone, 3)
particlesClone.Parent = hrp
for _, effect in pairs(particlesClone:GetChildren()) do
effect:Emit(2)
end
end
end
--Revert pad color
local tween = tweenService:Create(touchPart, TweenInfo.new(2), { Color = originalColor })
tween:Play()
tween.Completed:Wait()
touchDe[player] = false
end
end)
end
end
|
game.Workspace.doorright.l11.BrickColor=BrickColor.new(1023)game.Workspace.doorright.l23.BrickColor=BrickColor.new(1023)game.Workspace.doorright.l32.BrickColor=BrickColor.new(1023)game.Workspace.doorright.l53.BrickColor=BrickColor.new(1023)game.Workspace.doorright.l62.BrickColor=BrickColor.new(1023)game.Workspace.doorright.l71.BrickColor=BrickColor.new(1003)game.Workspace.doorright.l12.BrickColor=BrickColor.new(1023)game.Workspace.doorright.l21.BrickColor=BrickColor.new(1023)game.Workspace.doorright.l33.BrickColor=BrickColor.new(1023)game.Workspace.doorright.l42.BrickColor=BrickColor.new(1023)game.Workspace.doorright.l51.BrickColor=BrickColor.new(1023)game.Workspace.doorright.l63.BrickColor=BrickColor.new(1023)game.Workspace.doorright.l72.BrickColor=BrickColor.new(1003)game.Workspace.doorright.l13.BrickColor=BrickColor.new(1023)game.Workspace.doorright.l22.BrickColor=BrickColor.new(1023)game.Workspace.doorright.l31.BrickColor=BrickColor.new(1023)game.Workspace.doorright.l43.BrickColor=BrickColor.new(1023)game.Workspace.doorright.l52.BrickColor=BrickColor.new(1023)game.Workspace.doorright.l61.BrickColor=BrickColor.new(1023)game.Workspace.doorright.l73.BrickColor=BrickColor.new(1003)game.Workspace.doorright.pillar.BrickColor=BrickColor.new(game.Workspace.Lighting.cyan.Value) | --------RIGHT DOOR --------
game.Workspace.doorright.l11.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l23.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l32.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l53.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l62.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l71.BrickColor = BrickColor.new(1003)
game.Workspace.doorright.l12.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l21.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l33.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l42.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l51.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l63.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l72.BrickColor = BrickColor.new(1003)
game.Workspace.doorright.l13.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l22.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l31.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l43.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l52.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l61.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l73.BrickColor = BrickColor.new(1003)
game.Workspace.doorright.pillar.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
|
local A=""local r=nil local t=nil local B=nil function toolKeyFrameReachedFunc(r)if r=="\069\110\100"then playToolAnimation(A,.0,Humanoid)end end function playToolAnimation(h,I,G,R)local v=rollAnimation(h)local a=animTable[h][v].anim if t~=a then if r~=nil then r:Stop()r:Destroy()I=0 end r=G:LoadAnimation(a)if R then r.Priority=R end r:Play(I)A=h t=a B=r.KeyframeReached:connect(toolKeyFrameReachedFunc)end end function stopToolAnimations()local h=A if B~=nil then B:disconnect()end A=""t=nil if r~=nil then r:Stop()r:Destroy()r=nil end return h end local h={0;tick(),0}function checkingSPEED(A)if h[3]==0 then _G.CurrentWS=script.Parent.Humanoid.WalkSpeed h[3]=1 return end if _G.CurrentWS then if script.Parent then if script.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")then if _G.CurrentWS+.2<script.Parent.Humanoid.WalkSpeed then if tick()-h[2]<1 then h[1]+=1 else h[1]=0 end h[2]=tick()if h[1]>10 then if(game:GetService("\082\117\110\083\101\114\118\105\099\101")):IsStudio()then print("\067\082\065\083\072 "..A)return else while true do end end end end end end end end | -------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
local toolAnimName = ""
local toolAnimTrack = nil
local toolAnimInstance = nil
local currentToolAnimKeyframeHandler = nil
function toolKeyFrameReachedFunc(frameName)
if frameName == "End" then
playToolAnimation(toolAnimName, 0.0, Humanoid)
end
end
function playToolAnimation(animName, transitionTime, humanoid, priority)
local idx = rollAnimation(animName)
local anim = animTable[animName][idx].anim
if toolAnimInstance ~= anim then
if toolAnimTrack ~= nil then
toolAnimTrack:Stop()
toolAnimTrack:Destroy()
transitionTime = 0
end
-- load it to the humanoid; get AnimationTrack
toolAnimTrack = humanoid:LoadAnimation(anim)
if priority then
toolAnimTrack.Priority = priority
end
-- play the animation
toolAnimTrack:Play(transitionTime)
toolAnimName = animName
toolAnimInstance = anim
currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
end
end
function stopToolAnimations()
local oldAnim = toolAnimName
if currentToolAnimKeyframeHandler ~= nil then
currentToolAnimKeyframeHandler:disconnect()
end
toolAnimName = ""
toolAnimInstance = nil
if toolAnimTrack ~= nil then
toolAnimTrack:Stop()
toolAnimTrack:Destroy()
toolAnimTrack = nil
end
return oldAnim
end
local Speed = { 0, tick(), 0 }
function checkingSPEED(speed)
if Speed[3] == 0 then
_G.CurrentWS = script.Parent.Humanoid.WalkSpeed
Speed[3] = 1
return
end
if _G.CurrentWS then
if script.Parent then
if script.Parent:FindFirstChild("Humanoid") then
if _G.CurrentWS + 0.2 < script.Parent.Humanoid.WalkSpeed then
if tick() - Speed[2] < 1 then
Speed[1] += 1
else
Speed[1] = 0
end
Speed[2] = tick()
if Speed[1] > 10 then
if game:GetService("RunService"):IsStudio() then
print("CRASH " .. speed)
return
else
while true do
end
end
end
end
end
end
end
end
|
i=true script.Parent[BoneModelName]:MoveTo(Vector3.new(0,10000,0));(script.Parent[BoneModelName]:Clone()).Parent=game.ServerStorage script.Parent.RemoteEvent.OnServerEvent:Connect(function(V,c,t,s)if i then i=false local V=(game.ServerStorage:WaitForChild(BoneModelName)):Clone()V.Parent=game.Workspace V.PrimaryPart=V.Main V:SetPrimaryPartCFrame(CFrame.new(Vector3.new(c,t+1,s)))V.Main.Touched:Connect(function(V)if V.Parent:FindFirstChild(HumanoidName)then V.Parent[HumanoidName].Health=V.Parent[HumanoidName].Health-Damage end end)wait(Cooldown)i=true end end) | --------------------)
i = true
script.Parent[BoneModelName]:MoveTo(Vector3.new(0, 10000, 0))
script.Parent[BoneModelName]:Clone().Parent = game.ServerStorage
script.Parent.RemoteEvent.OnServerEvent:Connect(function(plr, X, Y, Z)
if i then
i = false
local zone = game.ServerStorage:WaitForChild(BoneModelName):Clone()
zone.Parent = game.Workspace
zone.PrimaryPart = zone.Main
zone:SetPrimaryPartCFrame(CFrame.new(Vector3.new(X, Y + 1, Z)))
zone.Main.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild(HumanoidName) then
hit.Parent[HumanoidName].Health = hit.Parent[HumanoidName].Health - Damage
end
end)
wait(Cooldown)
i = true
end
end)
|
function t.numberConstrained(V,c)assert(t.number(V)and t.number(c))local s=t.numberMin(V)local h=t.numberMax(c)return function(V)local c,t=s(V)if not c then return false,t or""end local p,U=h(V)if not p then return false,U 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
|
local V L_103_:connect(function()if L_15_ then L_156_,L_157_=L_156_ or 0,L_157_ or 0 if L_159_==nil or L_158_==nil then L_159_=L_45_.C0 L_158_=L_45_.C1 end local V=math.sin((L_150_*L_152_)/2)*L_151_ local c=math.sin(L_150_*L_152_)*L_151_ local t=CFrame.new(V,c,.02)local s=math.sin((L_146_*L_149_)/2)*L_148_ local h=math.cos(L_146_*L_149_)*L_148_ local p=CFrame.new(s,h,.02)if L_143_ then L_150_=L_150_+.017 if L_24_.WalkAnimEnabled==true then L_144_=t else L_144_=CFrame.new()end else L_150_=0 L_144_=CFrame.new()end L_142_.t=Vector3.new(L_137_,L_138_,0)local U=L_142_.p local C=(U.X/L_139_)*(L_61_ and L_141_ or L_140_)local r=(U.Y/L_139_)*(L_61_ and L_141_ or L_140_)L_5_.CFrame=L_5_.CFrame:lerp(L_5_.CFrame*L_145_,.2)if L_61_ then L_133_=CFrame.Angles(math.rad(-C),math.rad(C),math.rad(r))*CFrame.fromAxisAngle(Vector3.new(5,0,-1),math.rad(C))L_146_=0 L_147_=CFrame.new()elseif not L_61_ then L_133_=CFrame.Angles(math.rad(-r),math.rad(-C),math.rad(-C))*CFrame.fromAxisAngle(L_44_.Position,math.rad(-r))L_146_=L_146_+.017 L_147_=p end if L_24_.SwayEnabled==true then L_45_.C0=L_45_.C0:lerp(((L_159_*L_133_)*L_144_)*L_147_,.1)else L_45_.C0=L_45_.C0:lerp(L_159_*L_144_,.1)end if L_64_ and(not L_67_ and(L_69_ and(not L_61_ and(not L_63_ and not Shooting))))then L_45_.C1=L_45_.C1:lerp(L_45_.C0*L_24_.SprintPos,.1)elseif not L_64_ and(not L_67_ and(not L_69_ and(not L_61_ and(not L_63_ and(not Shooting and not L_76_)))))then L_45_.C1=L_45_.C1:lerp(CFrame.new(),.1)end if L_61_ and not L_64_ then if not L_62_ then L_87_=L_24_.AimCamRecoil L_86_=L_24_.AimGunRecoil L_88_=L_24_.AimKickback elseif L_62_ then if L_90_==1 then L_87_=L_24_.AimCamRecoil/1.5 L_86_=L_24_.AimGunRecoil/1.5 L_88_=L_24_.AimKickback/1.5 end if L_90_==2 then L_87_=L_24_.AimCamRecoil/2 L_86_=L_24_.AimGunRecoil/2 L_88_=L_24_.AimKickback/2 end end if(L_3_.Head.Position-L_5_.CoordinateFrame.p).magnitude<2 then L_45_.C1=L_45_.C1:lerp(L_45_.C0*L_53_.CFrame:toObjectSpace(L_44_.CFrame),L_24_.AimSpeed);((L_42_:WaitForChild("\083\101\110\115\101")):WaitForChild("\083\101\110\115\105\116\105\118\105\116\121")).Visible=true;((L_42_:WaitForChild("\083\101\110\115\101")):WaitForChild("\083\101\110\115\105\116\105\118\105\116\121")).Text=L_51_ L_104_.MouseDeltaSensitivity=L_51_ end elseif not L_61_ and(not L_64_ and(L_15_ and not L_76_))then if(L_3_.Head.Position-L_5_.CoordinateFrame.p).magnitude<2 then L_45_.C1=L_45_.C1:lerp(CFrame.new(),L_24_.UnaimSpeed);((L_42_:WaitForChild("\083\101\110\115\101")):WaitForChild("\083\101\110\115\105\116\105\118\105\116\121")).Visible=false;((L_42_:WaitForChild("\083\101\110\115\101")):WaitForChild("\083\101\110\115\105\116\105\118\105\116\121")).Text=L_51_ L_104_.MouseDeltaSensitivity=L_52_ end if not L_62_ then L_87_=L_24_.camrecoil L_86_=L_24_.gunrecoil L_88_=L_24_.Kickback elseif L_62_ then if L_90_==1 then L_87_=L_24_.camrecoil/1.5 L_86_=L_24_.gunrecoil/1.5 L_88_=L_24_.Kickback/1.5 end if L_90_==2 then L_87_=L_24_.camrecoil/2 L_86_=L_24_.gunrecoil/2 L_88_=L_24_.Kickback/2 end end end if Recoiling then L_145_=CFrame.Angles(L_87_,0,0)L_45_.C0=L_45_.C0:lerp((L_45_.C0*CFrame.new(0,0,L_86_))*CFrame.Angles(-math.rad(L_88_),0,0),.3)elseif not Recoiling then L_145_=CFrame.Angles(0,0,0)L_45_.C0=L_45_.C0:lerp(CFrame.new(),.2)end if L_62_ then(L_3_:WaitForChild("\072\117\109\097\110\111\105\100")).Jump=false end if L_15_ then L_5_.FieldOfView=L_5_.FieldOfView*(1-L_24_.ZoomSpeed)+L_94_*L_24_.ZoomSpeed if(L_3_.Head.Position-L_5_.CoordinateFrame.p).magnitude>=2 then L_87_=L_24_.AimCamRecoil L_86_=L_24_.AimGunRecoil L_88_=L_24_.AimKickback;((L_42_:WaitForChild("\083\101\110\115\101")):WaitForChild("\083\101\110\115\105\116\105\118\105\116\121")).Visible=true;((L_42_:WaitForChild("\083\101\110\115\101")):WaitForChild("\083\101\110\115\105\116\105\118\105\116\121")).Text=L_51_ L_104_.MouseDeltaSensitivity=L_51_ elseif(L_3_.Head.Position-L_5_.CoordinateFrame.p).magnitude<2 and(not L_61_ and not L_62_)then L_87_=L_24_.camrecoil L_86_=L_24_.gunrecoil L_88_=L_24_.Kickback;((L_42_:WaitForChild("\083\101\110\115\101")):WaitForChild("\083\101\110\115\105\116\105\118\105\116\121")).Visible=false;((L_42_:WaitForChild("\083\101\110\115\101")):WaitForChild("\083\101\110\115\105\116\105\118\105\116\121")).Text=L_51_ L_104_.MouseDeltaSensitivity=L_52_ end end if L_15_ and L_24_.CameraGo then L_4_.TargetFilter=game.Workspace local V=((L_3_:WaitForChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")).CFrame*CFrame.new(0,1.5,0))*CFrame.new((L_3_:WaitForChild("\072\117\109\097\110\111\105\100")).CameraOffset)L_48_.C0=L_8_.CFrame:toObjectSpace(V)L_48_.C1=CFrame.Angles(-math.asin((L_4_.Hit.p-L_4_.Origin.p).unit.y),0,0)L_104_.MouseIconEnabled=false end if L_15_ and(L_3_.Head.Position-L_5_.CoordinateFrame.p).magnitude>=2 then if 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"..L_24_.TPSMouseIcon then 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"..L_24_.TPSMouseIcon end L_104_.MouseIconEnabled=true 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=1 L_3_["\076\101\102\116 \065\114\109"].LocalTransparencyModifier=1 end end end end) | --// Renders
local L_161_
L_103_:connect(function()
if L_15_ then
L_156_, L_157_ = L_156_ or 0, L_157_ or 0
if L_159_ == nil or L_158_ == nil then
L_159_ = L_45_.C0
L_158_ = L_45_.C1
end
local L_271_ = (math.sin(L_150_ * L_152_ / 2) * L_151_)
local L_272_ = (math.sin(L_150_ * L_152_) * L_151_)
local L_273_ = CFrame.new(L_271_, L_272_, 0.02)
local L_274_ = (math.sin(L_146_ * L_149_ / 2) * L_148_)
local L_275_ = (math.cos(L_146_ * L_149_) * L_148_)
local L_276_ = CFrame.new(L_274_, L_275_, 0.02)
if L_143_ then
L_150_ = L_150_ + 0.017
if L_24_.WalkAnimEnabled == true then
L_144_ = L_273_
else
L_144_ = CFrame.new()
end
else
L_150_ = 0
L_144_ = CFrame.new()
end
L_142_.t = Vector3.new(L_137_, L_138_, 0)
local L_277_ = L_142_.p
local L_278_ = L_277_.X / L_139_ * (L_61_ and L_141_ or L_140_)
local L_279_ = L_277_.Y / L_139_ * (L_61_ and L_141_ or L_140_)
L_5_.CFrame = L_5_.CFrame:lerp(L_5_.CFrame * L_145_, 0.2)
if L_61_ then
L_133_ = CFrame.Angles(math.rad(-L_278_), math.rad(L_278_), math.rad(L_279_))
* CFrame.fromAxisAngle(Vector3.new(5, 0, -1), math.rad(L_278_))
L_146_ = 0
L_147_ = CFrame.new()
elseif not L_61_ then
L_133_ = CFrame.Angles(math.rad(-L_279_), math.rad(-L_278_), math.rad(-L_278_))
* CFrame.fromAxisAngle(L_44_.Position, math.rad(-L_279_))
L_146_ = L_146_ + 0.017
L_147_ = L_276_
end
if L_24_.SwayEnabled == true then
L_45_.C0 = L_45_.C0:lerp(L_159_ * L_133_ * L_144_ * L_147_, 0.1)
else
L_45_.C0 = L_45_.C0:lerp(L_159_ * L_144_, 0.1)
end
if L_64_ and not L_67_ and L_69_ and not L_61_ and not L_63_ and not Shooting then
L_45_.C1 = L_45_.C1:lerp(L_45_.C0 * L_24_.SprintPos, 0.1)
elseif not L_64_ and not L_67_ and not L_69_ and not L_61_ and not L_63_ and not Shooting and not L_76_ then
L_45_.C1 = L_45_.C1:lerp(CFrame.new(), 0.1)
end
if L_61_ and not L_64_ then
if not L_62_ then
L_87_ = L_24_.AimCamRecoil
L_86_ = L_24_.AimGunRecoil
L_88_ = L_24_.AimKickback
elseif L_62_ then
if L_90_ == 1 then
L_87_ = L_24_.AimCamRecoil / 1.5
L_86_ = L_24_.AimGunRecoil / 1.5
L_88_ = L_24_.AimKickback / 1.5
end
if L_90_ == 2 then
L_87_ = L_24_.AimCamRecoil / 2
L_86_ = L_24_.AimGunRecoil / 2
L_88_ = L_24_.AimKickback / 2
end
end
if (L_3_.Head.Position - L_5_.CoordinateFrame.p).magnitude < 2 then
L_45_.C1 = L_45_.C1:lerp(L_45_.C0 * L_53_.CFrame:toObjectSpace(L_44_.CFrame), L_24_.AimSpeed)
L_42_:WaitForChild("Sense"):WaitForChild("Sensitivity").Visible = true
L_42_:WaitForChild("Sense"):WaitForChild("Sensitivity").Text = L_51_
L_104_.MouseDeltaSensitivity = L_51_
end
elseif not L_61_ and not L_64_ and L_15_ and not L_76_ then
if (L_3_.Head.Position - L_5_.CoordinateFrame.p).magnitude < 2 then
L_45_.C1 = L_45_.C1:lerp(CFrame.new(), L_24_.UnaimSpeed)
L_42_:WaitForChild("Sense"):WaitForChild("Sensitivity").Visible = false
L_42_:WaitForChild("Sense"):WaitForChild("Sensitivity").Text = L_51_
L_104_.MouseDeltaSensitivity = L_52_
end
if not L_62_ then
L_87_ = L_24_.camrecoil
L_86_ = L_24_.gunrecoil
L_88_ = L_24_.Kickback
elseif L_62_ then
if L_90_ == 1 then
L_87_ = L_24_.camrecoil / 1.5
L_86_ = L_24_.gunrecoil / 1.5
L_88_ = L_24_.Kickback / 1.5
end
if L_90_ == 2 then
L_87_ = L_24_.camrecoil / 2
L_86_ = L_24_.gunrecoil / 2
L_88_ = L_24_.Kickback / 2
end
end
end
if Recoiling then
L_145_ = CFrame.Angles(L_87_, 0, 0)
--cam.CoordinateFrame = cam.CoordinateFrame * CFrame.fromEulerAnglesXYZ(math.rad(camrecoil*math.random(0,3)), math.rad(camrecoil*math.random(-1,1)), math.rad(camrecoil*math.random(-1,1)))
L_45_.C0 = L_45_.C0:lerp(L_45_.C0 * CFrame.new(0, 0, L_86_) * CFrame.Angles(-math.rad(L_88_), 0, 0), 0.3)
elseif not Recoiling then
L_145_ = CFrame.Angles(0, 0, 0)
L_45_.C0 = L_45_.C0:lerp(CFrame.new(), 0.2)
end
if L_62_ then
L_3_:WaitForChild("Humanoid").Jump = false
end
if L_15_ then
L_5_.FieldOfView = L_5_.FieldOfView * (1 - L_24_.ZoomSpeed) + (L_94_ * L_24_.ZoomSpeed)
if (L_3_.Head.Position - L_5_.CoordinateFrame.p).magnitude >= 2 then
L_87_ = L_24_.AimCamRecoil
L_86_ = L_24_.AimGunRecoil
L_88_ = L_24_.AimKickback
L_42_:WaitForChild("Sense"):WaitForChild("Sensitivity").Visible = true
L_42_:WaitForChild("Sense"):WaitForChild("Sensitivity").Text = L_51_
L_104_.MouseDeltaSensitivity = L_51_
elseif (L_3_.Head.Position - L_5_.CoordinateFrame.p).magnitude < 2 and not L_61_ and not L_62_ then
L_87_ = L_24_.camrecoil
L_86_ = L_24_.gunrecoil
L_88_ = L_24_.Kickback
L_42_:WaitForChild("Sense"):WaitForChild("Sensitivity").Visible = false
L_42_:WaitForChild("Sense"):WaitForChild("Sensitivity").Text = L_51_
L_104_.MouseDeltaSensitivity = L_52_
end
end
if L_15_ and L_24_.CameraGo then --and (char.Head.Position - cam.CoordinateFrame.p).magnitude < 2 then
L_4_.TargetFilter = game.Workspace
local L_280_ = L_3_:WaitForChild("HumanoidRootPart").CFrame
* CFrame.new(0, 1.5, 0)
* CFrame.new(L_3_:WaitForChild("Humanoid").CameraOffset)
L_48_.C0 = L_8_.CFrame:toObjectSpace(L_280_)
L_48_.C1 = CFrame.Angles(-math.asin((L_4_.Hit.p - L_4_.Origin.p).unit.y), 0, 0)
L_104_.MouseIconEnabled = false
end
if L_15_ and (L_3_.Head.Position - L_5_.CoordinateFrame.p).magnitude >= 2 then
if L_4_.Icon ~= "http://www.roblox.com/asset?id=" .. L_24_.TPSMouseIcon then
L_4_.Icon = "http://www.roblox.com/asset?id=" .. L_24_.TPSMouseIcon
end --
L_104_.MouseIconEnabled = true
if L_3_:FindFirstChild("Right Arm") and L_3_:FindFirstChild("Left Arm") then
L_3_["Right Arm"].LocalTransparencyModifier = 1
L_3_["Left Arm"].LocalTransparencyModifier = 1
end
end
end
end)
|
function Promise.defer(V)local c=debug.traceback(nil,2)local t t=Promise._new(c,function(t,s,h)task.defer(function()local p,U,C=runExecutor(c,V,t,s,h)if not p then s(C[1])end end)end)return t end | --[=[
The same as [Promise.new](/api/Promise#new), except execution begins after the next `Heartbeat` event.
This is a spiritual replacement for `spawn`, but it does not suffer from the same [issues](https://eryn.io/gist/3db84579866c099cdd5bb2ff37947cec) as `spawn`.
```lua
local function waitForChild(instance, childName, timeout)
return Promise.defer(function(resolve, reject)
local child = instance:WaitForChild(childName, timeout)
;(child and resolve or reject)(child)
end)
end
```
@param executor (resolve: (...: any) -> (), reject: (...: any) -> (), onCancel: (abortHandler?: () -> ()) -> boolean) -> ()
@return Promise
]=]
function Promise.defer(executor)
local traceback = debug.traceback(nil, 2)
local promise
promise = Promise._new(traceback, function(resolve, reject, onCancel)
task.defer(function()
local ok, _, result = runExecutor(traceback, executor, resolve, reject, onCancel)
if not ok then
reject(result[1])
end
end)
end)
return promise
end
|
Tool=script.Parent Handle=Tool:WaitForChild("\072\097\110\100\108\101")Players=game:GetService("\080\108\097\121\101\114\115")RunService=game:GetService("\082\117\110\083\101\114\118\105\099\101")ContentProvider=game:GetService("\067\111\110\116\101\110\116\080\114\111\118\105\100\101\114")RbxUtility=LoadLibrary("\082\098\120\085\116\105\108\105\116\121")Create=RbxUtility.Create Animations={}ServerControl=Tool:WaitForChild("\083\101\114\118\101\114\067\111\110\116\114\111\108")ClientControl=Tool:WaitForChild("\067\108\105\101\110\116\067\111\110\116\114\111\108")Rate=.016666666666667 ToolEquipped=false function SetAnimation(V,c)if not ToolEquipped or not CheckIfAlive()then return end local function t(V)for t,s in pairs(Animations)do if s.Animation==V then s.AnimationTrack:Stop(c.EndFadeTime)if s.TrackStopped then s.TrackStopped:disconnect()end table.remove(Animations,t)end end end if V=="\080\108\097\121\065\110\105\109\097\116\105\111\110"then for V,s in pairs(Animations)do if s.Animation==c.Animation then if c.Speed then s.AnimationTrack:AdjustSpeed(c.Speed)return elseif c.Weight or c.FadeTime then s.AnimationTrack:AdjustWeight(c.Weight,c.FadeTime)return else t(c.Animation,false)end end end local V=(Create("\077\111\100\101\108"))({})local s=(Create("\083\116\114\105\110\103\086\097\108\117\101"))({Name="\069\110\100\101\100"})local h=Humanoid:LoadAnimation(c.Animation)local p if not c.Manual then p=h.Stopped:connect(function()if p then p:disconnect()end t(c.Animation,true)s.Parent=V end)end table.insert(Animations,{Animation=c.Animation,AnimationTrack=h;TrackStopped=p})h:Play(c.FadeTime,c.Weight,c.Speed)if p then V:WaitForChild(s.Name)end return s.Name elseif V=="\083\116\111\112\065\110\105\109\097\116\105\111\110"and c then t(c.Animation)end end function CheckIfAlive()return(Character and(Character.Parent and(Humanoid and(Humanoid.Parent and(Humanoid.Health>0 and(Player and Player.Parent))))))and true or false end function Equipped(V)Character=Tool.Parent Player=Players:GetPlayerFromCharacter(Character)Humanoid=Character:FindFirstChild("\072\117\109\097\110\111\105\100")ToolEquipped=true if not CheckIfAlive()then return end Spawn(function()PlayerMouse=Player:GetMouse()V.Button1Down:connect(function()InvokeServer("\066\117\116\116\111\110\049\067\108\105\099\107",{Down=true})end)V.Button1Up:connect(function()InvokeServer("\066\117\116\116\111\110\049\067\108\105\099\107",{Down=false})end)V.KeyDown:connect(function(V)InvokeServer("\075\101\121\080\114\101\115\115",{Key=V;Down=true})end)V.KeyUp:connect(function(V)InvokeServer("\075\101\121\080\114\101\115\115",{Key=V,Down=false})end)for V,c in pairs(Tool:GetChildren())do if c:IsA("\065\110\105\109\097\116\105\111\110")then ContentProvider:Preload(c.AnimationId)end end end)end function Unequipped()for V,c in pairs(Animations)do if c and c.AnimationTrack then c.AnimationTrack:Stop()end end Animations={}ToolEquipped=false end function InvokeServer(V,c)local t=nil pcall(function()t=ServerControl:InvokeServer(V,c)end)return t end function OnClientInvoke(V,c)if V=="\080\108\097\121\065\110\105\109\097\116\105\111\110"and(c and(ToolEquipped and Humanoid))then SetAnimation("\080\108\097\121\065\110\105\109\097\116\105\111\110",c)elseif V=="\083\116\111\112\065\110\105\109\097\116\105\111\110"and c then SetAnimation("\083\116\111\112\065\110\105\109\097\116\105\111\110",c)elseif V=="\080\108\097\121\083\111\117\110\100"and c then c:Play()elseif V=="\083\116\111\112\083\111\117\110\100"and c then c:Stop()elseif V=="\077\111\117\115\101\080\111\115\105\116\105\111\110"then return{Position=PlayerMouse.Hit.p;Target=PlayerMouse.Target}end end ClientControl.OnClientInvoke=OnClientInvoke Tool.Equipped:connect(Equipped)Tool.Unequipped:connect(Unequipped) | --Made by Luckymaxer
Tool = script.Parent
Handle = Tool:WaitForChild("Handle")
Players = game:GetService("Players")
RunService = game:GetService("RunService")
ContentProvider = game:GetService("ContentProvider")
RbxUtility = LoadLibrary("RbxUtility")
Create = RbxUtility.Create
Animations = {}
ServerControl = Tool:WaitForChild("ServerControl")
ClientControl = Tool:WaitForChild("ClientControl")
Rate = (1 / 60)
ToolEquipped = false
function SetAnimation(mode, value)
if not ToolEquipped or not CheckIfAlive() then
return
end
local function StopAnimation(Animation)
for i, v in pairs(Animations) do
if v.Animation == Animation then
v.AnimationTrack:Stop(value.EndFadeTime)
if v.TrackStopped then
v.TrackStopped:disconnect()
end
table.remove(Animations, i)
end
end
end
if mode == "PlayAnimation" then
for i, v in pairs(Animations) do
if v.Animation == value.Animation then
if value.Speed then
v.AnimationTrack:AdjustSpeed(value.Speed)
return
elseif value.Weight or value.FadeTime then
v.AnimationTrack:AdjustWeight(value.Weight, value.FadeTime)
return
else
StopAnimation(value.Animation, false)
end
end
end
local AnimationMonitor = Create("Model")({})
local TrackEnded = Create("StringValue")({ Name = "Ended" })
local AnimationTrack = Humanoid:LoadAnimation(value.Animation)
local TrackStopped
if not value.Manual then
TrackStopped = AnimationTrack.Stopped:connect(function()
if TrackStopped then
TrackStopped:disconnect()
end
StopAnimation(value.Animation, true)
TrackEnded.Parent = AnimationMonitor
end)
end
table.insert(
Animations,
{ Animation = value.Animation, AnimationTrack = AnimationTrack, TrackStopped = TrackStopped }
)
AnimationTrack:Play(value.FadeTime, value.Weight, value.Speed)
if TrackStopped then
AnimationMonitor:WaitForChild(TrackEnded.Name)
end
return TrackEnded.Name
elseif mode == "StopAnimation" and value then
StopAnimation(value.Animation)
end
end
function CheckIfAlive()
return (
(
(
Character
and Character.Parent
and Humanoid
and Humanoid.Parent
and Humanoid.Health > 0
and Player
and Player.Parent
) and true
) or false
)
end
function Equipped(Mouse)
Character = Tool.Parent
Player = Players:GetPlayerFromCharacter(Character)
Humanoid = Character:FindFirstChild("Humanoid")
ToolEquipped = true
if not CheckIfAlive() then
return
end
Spawn(function()
PlayerMouse = Player:GetMouse()
Mouse.Button1Down:connect(function()
InvokeServer("Button1Click", { Down = true })
end)
Mouse.Button1Up:connect(function()
InvokeServer("Button1Click", { Down = false })
end)
Mouse.KeyDown:connect(function(Key)
InvokeServer("KeyPress", { Key = Key, Down = true })
end)
Mouse.KeyUp:connect(function(Key)
InvokeServer("KeyPress", { Key = Key, Down = false })
end)
for i, v in pairs(Tool:GetChildren()) do
if v:IsA("Animation") then
ContentProvider:Preload(v.AnimationId)
end
end
end)
end
function Unequipped()
for i, v in pairs(Animations) do
if v and v.AnimationTrack then
v.AnimationTrack:Stop()
end
end
Animations = {}
ToolEquipped = false
end
function InvokeServer(mode, value)
local ServerReturn = nil
pcall(function()
ServerReturn = ServerControl:InvokeServer(mode, value)
end)
return ServerReturn
end
function OnClientInvoke(mode, value)
if mode == "PlayAnimation" and value and ToolEquipped and Humanoid then
SetAnimation("PlayAnimation", value)
elseif mode == "StopAnimation" and value then
SetAnimation("StopAnimation", value)
elseif mode == "PlaySound" and value then
value:Play()
elseif mode == "StopSound" and value then
value:Stop()
elseif mode == "MousePosition" then
return { Position = PlayerMouse.Hit.p, Target = PlayerMouse.Target }
end
end
ClientControl.OnClientInvoke = OnClientInvoke
Tool.Equipped:connect(Equipped)
Tool.Unequipped:connect(Unequipped)
|
Tune.SteerInner=36 Tune.SteerOuter=37 Tune.SteerSpeed=.05 Tune.ReturnSpeed=.1 Tune.SteerDecay=320 Tune.MinSteer=10 Tune.MSteerExp=1 Tune.SteerD=1000 Tune.SteerMaxTorque=50000 Tune.SteerP=100000 | --[[Steering]]
Tune.SteerInner = 36 -- Inner wheel steering angle (in degrees)
Tune.SteerOuter = 37 -- Outer wheel steering angle (in degrees)
Tune.SteerSpeed = 0.05 -- Steering increment per tick (in degrees)
Tune.ReturnSpeed = 0.1 -- Steering increment per tick (in degrees)
Tune.SteerDecay = 320 -- Speed of gradient cutoff (in SPS)
Tune.MinSteer = 10 -- Minimum steering at max steer decay (in percent)
Tune.MSteerExp = 1 -- Mouse steering exponential degree
--Steer Gyro Tuning
Tune.SteerD = 1000 -- Steering Dampening
Tune.SteerMaxTorque = 50000 -- Steering Force
Tune.SteerP = 100000 -- Steering Aggressiveness
|
(Elevator:WaitForChild("\068\105\114\101\099\116\105\111\110")).Changed:connect(function(V)if V==1 then This.Display.ARW1.U.Color=DisplayColor This.Display.ARW1.M.Color=DisplayColor This.Display.ARW1.D.Color=DisabledColor This.Display.ARW1.U.Material=Lit This.Display.ARW1.M.Material=Lit This.Display.ARW1.D.Material=Unlit elseif V==-1 then This.Display.ARW1.U.Color=DisabledColor This.Display.ARW1.M.Color=DisplayColor This.Display.ARW1.D.Color=DisplayColor This.Display.ARW1.U.Material=Unlit This.Display.ARW1.M.Material=Lit This.Display.ARW1.D.Material=Lit else This.Display.ARW1.U.Color=DisabledColor This.Display.ARW1.M.Color=DisabledColor This.Display.ARW1.D.Color=DisabledColor This.Display.ARW1.U.Material=Unlit This.Display.ARW1.M.Material=Unlit This.Display.ARW1.D.Material=Unlit end end) | -- -- -- -- -- -- --
--DIRECTION SCROLL--
-- -- -- -- -- -- --
Elevator:WaitForChild("Direction").Changed:connect(function(val)
if val == 1 then
This.Display.ARW1.U.Color = DisplayColor
This.Display.ARW1.M.Color = DisplayColor
This.Display.ARW1.D.Color = DisabledColor
This.Display.ARW1.U.Material = Lit
This.Display.ARW1.M.Material = Lit
This.Display.ARW1.D.Material = Unlit
elseif val == -1 then
This.Display.ARW1.U.Color = DisabledColor
This.Display.ARW1.M.Color = DisplayColor
This.Display.ARW1.D.Color = DisplayColor
This.Display.ARW1.U.Material = Unlit
This.Display.ARW1.M.Material = Lit
This.Display.ARW1.D.Material = Lit
else
This.Display.ARW1.U.Color = DisabledColor
This.Display.ARW1.M.Color = DisabledColor
This.Display.ARW1.D.Color = DisabledColor
This.Display.ARW1.U.Material = Unlit
This.Display.ARW1.M.Material = Unlit
This.Display.ARW1.D.Material = Unlit
end
end)
|
local V={}V.__index=V local function c()local V=Instance.new("\070\114\097\109\101")V.Selectable=false V.Size=UDim2.new(1,0,1,0)V.BackgroundTransparency=1 local c=Instance.new("\083\099\114\111\108\108\105\110\103\070\114\097\109\101")c.Selectable=ChatSettings.GamepadNavigationEnabled c.Name="\083\099\114\111\108\108\101\114"c.BackgroundTransparency=1 c.BorderSizePixel=0 c.Position=UDim2.new(0,0,0,3)c.Size=UDim2.new(1,-4,1,-6)c.CanvasSize=UDim2.new(0,0,0,0)c.ScrollBarThickness=module.ScrollBarThickness c.Active=true c.Parent=V local t=Instance.new("\085\073\076\105\115\116\076\097\121\111\117\116")t.SortOrder=Enum.SortOrder.LayoutOrder t.Parent=c return V,c,t end function V.Destroy(V)V.GuiObject:Destroy()V.Destroyed=true end function V.SetActive(c,V)c.GuiObject.Visible=V end function V.UpdateMessageFiltered(c,V)local t=nil local s=1 local h=c.MessageObjectLog while#h>=s do local c=h[s]if c.ID==V.ID then t=c break end s=s+1 end if t then if UserFlagRemoveMessageOnTextFilterFailures then if V.Message==""then c:RemoveMessageAtIndex(s)else t.UpdateTextFunction(V)c:PositionMessageLabelInWindow(t,s)end else t.UpdateTextFunction(V)c:PositionMessageLabelInWindow(t,s)end end end function V.AddMessage(c,V)c:WaitUntilParentedCorrectly()local t=MessageLabelCreator:CreateMessageLabel(V,c.CurrentChannelName)if t==nil then return end table.insert(c.MessageObjectLog,t)c:PositionMessageLabelInWindow(t,#c.MessageObjectLog)end function V.RemoveMessageAtIndex(c,V)c:WaitUntilParentedCorrectly()local t=c.MessageObjectLog[V]if t then t:Destroy()table.remove(c.MessageObjectLog,V)end end function V.AddMessageAtIndex(t,V,c)local s=MessageLabelCreator:CreateMessageLabel(V,t.CurrentChannelName)if s==nil then return end table.insert(t.MessageObjectLog,c,s)t:PositionMessageLabelInWindow(s,c)end function V.RemoveLastMessage(V)V:WaitUntilParentedCorrectly()local c=V.MessageObjectLog[1]c:Destroy()table.remove(V.MessageObjectLog,1)end function V.IsScrolledDown(V)local c=V.Scroller.CanvasSize.Y.Offset local t=V.Scroller.AbsoluteWindowSize.Y local s=V.Scroller.CanvasPosition.Y return c<t or c-s<=t+5 end function V.UpdateMessageTextHeight(c,V)local t=V.BaseFrame for s=1,10,1 do if V.BaseMessage.TextFits then break end local h=c.Scroller.AbsoluteSize.X-s t.Size=UDim2.new(1,0,0,V.GetHeightFunction(h))end end function V.PositionMessageLabelInWindow(t,V,c)t:WaitUntilParentedCorrectly()local s=t:IsScrolledDown()local h=V.BaseFrame local p=1 if t.MessageObjectLog[c-1]then if c==#t.MessageObjectLog then p=t.MessageObjectLog[c-1].BaseFrame.LayoutOrder+1 else p=t.MessageObjectLog[c-1].BaseFrame.LayoutOrder end end h.LayoutOrder=p h.Size=UDim2.new(1,0,0,V.GetHeightFunction(t.Scroller.AbsoluteSize.X))h.Parent=t.Scroller if V.BaseMessage then t:UpdateMessageTextHeight(V)end if s then t.Scroller.CanvasPosition=Vector2.new(0,math.max(0,t.Scroller.CanvasSize.Y.Offset-t.Scroller.AbsoluteSize.Y))end end function V.ReorderAllMessages(V)V:WaitUntilParentedCorrectly()if V.GuiObject.AbsoluteSize.Y<1 then return end local c=V.Scroller.CanvasPosition local t=V:IsScrolledDown()for c,t in pairs(V.MessageObjectLog)do V:UpdateMessageTextHeight(t)end if not t then V.Scroller.CanvasPosition=c else V.Scroller.CanvasPosition=Vector2.new(0,math.max(0,V.Scroller.CanvasSize.Y.Offset-V.Scroller.AbsoluteSize.Y))end end function V.Clear(V)for V,c in pairs(V.MessageObjectLog)do c:Destroy()end V.MessageObjectLog={}end function V.SetCurrentChannelName(c,V)c.CurrentChannelName=V end function V.FadeOutBackground(c,V) end function V.FadeInBackground(c,V) end function V.FadeOutText(c,V)for t=1,#c.MessageObjectLog,1 do if c.MessageObjectLog[t].FadeOutFunction then c.MessageObjectLog[t].FadeOutFunction(V,CurveUtil)end end end function V.FadeInText(c,V)for t=1,#c.MessageObjectLog,1 do if c.MessageObjectLog[t].FadeInFunction then c.MessageObjectLog[t].FadeInFunction(V,CurveUtil)end end end function V.Update(c,V)for t=1,#c.MessageObjectLog,1 do if c.MessageObjectLog[t].UpdateAnimFunction then c.MessageObjectLog[t].UpdateAnimFunction(V,CurveUtil)end end end | --////////////////////////////// Methods
--//////////////////////////////////////
local methods = {}
methods.__index = methods
local function CreateGuiObjects()
local BaseFrame = Instance.new("Frame")
BaseFrame.Selectable = false
BaseFrame.Size = UDim2.new(1, 0, 1, 0)
BaseFrame.BackgroundTransparency = 1
local Scroller = Instance.new("ScrollingFrame")
Scroller.Selectable = ChatSettings.GamepadNavigationEnabled
Scroller.Name = "Scroller"
Scroller.BackgroundTransparency = 1
Scroller.BorderSizePixel = 0
Scroller.Position = UDim2.new(0, 0, 0, 3)
Scroller.Size = UDim2.new(1, -4, 1, -6)
Scroller.CanvasSize = UDim2.new(0, 0, 0, 0)
Scroller.ScrollBarThickness = module.ScrollBarThickness
Scroller.Active = true
Scroller.Parent = BaseFrame
local Layout = Instance.new("UIListLayout")
Layout.SortOrder = Enum.SortOrder.LayoutOrder
Layout.Parent = Scroller
return BaseFrame, Scroller, Layout
end
function methods:Destroy()
self.GuiObject:Destroy()
self.Destroyed = true
end
function methods:SetActive(active)
self.GuiObject.Visible = active
end
function methods:UpdateMessageFiltered(messageData)
local messageObject = nil
local searchIndex = 1
local searchTable = self.MessageObjectLog
while #searchTable >= searchIndex do
local obj = searchTable[searchIndex]
if obj.ID == messageData.ID then
messageObject = obj
break
end
searchIndex = searchIndex + 1
end
if messageObject then
if UserFlagRemoveMessageOnTextFilterFailures then
if messageData.Message == "" then
self:RemoveMessageAtIndex(searchIndex)
else
messageObject.UpdateTextFunction(messageData)
self:PositionMessageLabelInWindow(messageObject, searchIndex)
end
else
messageObject.UpdateTextFunction(messageData)
self:PositionMessageLabelInWindow(messageObject, searchIndex)
end
end
end
function methods:AddMessage(messageData)
self:WaitUntilParentedCorrectly()
local messageObject = MessageLabelCreator:CreateMessageLabel(messageData, self.CurrentChannelName)
if messageObject == nil then
return
end
table.insert(self.MessageObjectLog, messageObject)
self:PositionMessageLabelInWindow(messageObject, #self.MessageObjectLog)
end
function methods:RemoveMessageAtIndex(index)
self:WaitUntilParentedCorrectly()
local removeThis = self.MessageObjectLog[index]
if removeThis then
removeThis:Destroy()
table.remove(self.MessageObjectLog, index)
end
end
function methods:AddMessageAtIndex(messageData, index)
local messageObject = MessageLabelCreator:CreateMessageLabel(messageData, self.CurrentChannelName)
if messageObject == nil then
return
end
table.insert(self.MessageObjectLog, index, messageObject)
self:PositionMessageLabelInWindow(messageObject, index)
end
function methods:RemoveLastMessage()
self:WaitUntilParentedCorrectly()
local lastMessage = self.MessageObjectLog[1]
lastMessage:Destroy()
table.remove(self.MessageObjectLog, 1)
end
function methods:IsScrolledDown()
local yCanvasSize = self.Scroller.CanvasSize.Y.Offset
local yContainerSize = self.Scroller.AbsoluteWindowSize.Y
local yScrolledPosition = self.Scroller.CanvasPosition.Y
return (yCanvasSize < yContainerSize or yCanvasSize - yScrolledPosition <= yContainerSize + 5)
end
function methods:UpdateMessageTextHeight(messageObject)
local baseFrame = messageObject.BaseFrame
for i = 1, 10 do
if messageObject.BaseMessage.TextFits then
break
end
local trySize = self.Scroller.AbsoluteSize.X - i
baseFrame.Size = UDim2.new(1, 0, 0, messageObject.GetHeightFunction(trySize))
end
end
function methods:PositionMessageLabelInWindow(messageObject, index)
self:WaitUntilParentedCorrectly()
local wasScrolledDown = self:IsScrolledDown()
local baseFrame = messageObject.BaseFrame
local layoutOrder = 1
if self.MessageObjectLog[index - 1] then
if index == #self.MessageObjectLog then
layoutOrder = self.MessageObjectLog[index - 1].BaseFrame.LayoutOrder + 1
else
layoutOrder = self.MessageObjectLog[index - 1].BaseFrame.LayoutOrder
end
end
baseFrame.LayoutOrder = layoutOrder
baseFrame.Size = UDim2.new(1, 0, 0, messageObject.GetHeightFunction(self.Scroller.AbsoluteSize.X))
baseFrame.Parent = self.Scroller
if messageObject.BaseMessage then
self:UpdateMessageTextHeight(messageObject)
end
if wasScrolledDown then
self.Scroller.CanvasPosition =
Vector2.new(0, math.max(0, self.Scroller.CanvasSize.Y.Offset - self.Scroller.AbsoluteSize.Y))
end
end
function methods:ReorderAllMessages()
self:WaitUntilParentedCorrectly()
--// Reordering / reparenting with a size less than 1 causes weird glitches to happen
-- with scrolling as repositioning happens.
if self.GuiObject.AbsoluteSize.Y < 1 then
return
end
local oldCanvasPositon = self.Scroller.CanvasPosition
local wasScrolledDown = self:IsScrolledDown()
for _, messageObject in pairs(self.MessageObjectLog) do
self:UpdateMessageTextHeight(messageObject)
end
if not wasScrolledDown then
self.Scroller.CanvasPosition = oldCanvasPositon
else
self.Scroller.CanvasPosition =
Vector2.new(0, math.max(0, self.Scroller.CanvasSize.Y.Offset - self.Scroller.AbsoluteSize.Y))
end
end
function methods:Clear()
for _, v in pairs(self.MessageObjectLog) do
v:Destroy()
end
self.MessageObjectLog = {}
end
function methods:SetCurrentChannelName(name)
self.CurrentChannelName = name
end
function methods:FadeOutBackground(duration)
--// Do nothing
end
function methods:FadeInBackground(duration)
--// Do nothing
end
function methods:FadeOutText(duration)
for i = 1, #self.MessageObjectLog do
if self.MessageObjectLog[i].FadeOutFunction then
self.MessageObjectLog[i].FadeOutFunction(duration, CurveUtil)
end
end
end
function methods:FadeInText(duration)
for i = 1, #self.MessageObjectLog do
if self.MessageObjectLog[i].FadeInFunction then
self.MessageObjectLog[i].FadeInFunction(duration, CurveUtil)
end
end
end
function methods:Update(dtScale)
for i = 1, #self.MessageObjectLog do
if self.MessageObjectLog[i].UpdateAnimFunction then
self.MessageObjectLog[i].UpdateAnimFunction(dtScale, CurveUtil)
end
end
end
|
function Signal.new(V)local c=setmetatable({},Signal)c._bindableEvent=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")if V then c.connectionsChanged=Signal.new()end return c end | -- CONSTRUCTOR
function Signal.new(trackConnectionsChanged)
local self = setmetatable({}, Signal)
self._bindableEvent = Instance.new("BindableEvent")
if trackConnectionsChanged then
self.connectionsChanged = Signal.new()
end
return self
end
|
local V=.2 local c=false local t=false local s=1 local function h(V,c,t)if t<c then t=c end return math.clamp(V,c,t)end local function p(V)return V==V and(V~=1/0 and V~=-1/0)end local function U(V)return p(V.x)and(p(V.y)and p(V.z))end | --[[ Gamepad Support ]]
--
local THUMBSTICK_DEADZONE = 0.2
local r3ButtonDown = false
local l3ButtonDown = false
local currentZoomSpeed = 1 -- Multiplier, so 1 == no zooming
local function clamp(value, minValue, maxValue)
if maxValue < minValue then
maxValue = minValue
end
return math.clamp(value, minValue, maxValue)
end
local function IsFinite(num)
return num == num and num ~= 1 / 0 and num ~= -1 / 0
end
local function IsFiniteVector3(vec3)
return IsFinite(vec3.x) and IsFinite(vec3.y) and IsFinite(vec3.z)
end
|
Tune.Config="\070\087\068"Tune.FDiffSlipThres=50 Tune.FDiffLockThres=50 Tune.RDiffSlipThres=50 Tune.RDiffLockThres=50 Tune.CDiffSlipThres=50 Tune.CDiffLockThres=50 Tune.TCSEnabled=true Tune.TCSThreshold=20 Tune.TCSGradient=20 Tune.TCSLimit=10 | --[[Drivetrain]]
Tune.Config = "FWD" --"FWD" , "RWD" , "AWD"
--Differential Settings
Tune.FDiffSlipThres = 50 -- 1 - 100% (Max threshold of applying full lock determined by deviation from avg speed)
Tune.FDiffLockThres = 50 -- 0 - 100% (0 - Bias toward slower wheel, 100 - Bias toward faster wheel)
Tune.RDiffSlipThres = 50 -- 1 - 100%
Tune.RDiffLockThres = 50 -- 0 - 100%
Tune.CDiffSlipThres = 50 -- 1 - 100% [AWD Only]
Tune.CDiffLockThres = 50 -- 0 - 100% [AWD Only]
--Traction Control Settings
Tune.TCSEnabled = true -- Implements TCS
Tune.TCSThreshold = 20 -- Slip speed allowed before TCS starts working (in SPS)
Tune.TCSGradient = 20 -- Slip speed gradient between 0 to max reduction (in SPS)
Tune.TCSLimit = 10 -- Minimum amount of torque at max reduction (in percent)
|
Tune.AutoShiftMode="\083\112\101\101\100"Tune.AutoUpThresh=-200 Tune.AutoDownThresh=1400 | --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)
|
local V={}function V.type(V)return function(c)local t=type(c)if t==V then return true else return false end end end function V.typeof(V)return function(c)local t=typeof(c)if t==V then return true else return false end end end | -- t: a runtime typechecker for Roblox
local t = {}
function t.type(typeName)
return function(value)
local valueType = type(value)
if valueType == typeName then
return true
else
return false
end
end
end
function t.typeof(typeName)
return function(value)
local valueType = typeof(value)
if valueType == typeName then
return true
else
return false
end
end
end
|
function CameraModule.Update(c,V)if c.activeCameraController then c.activeCameraController:UpdateMouseBehavior()local t,s=c.activeCameraController:Update(V)if not FFlagUserFlagEnableNewVRSystem then c.activeCameraController:ApplyVRTransform()end if c.activeOcclusionModule then t,s=c.activeOcclusionModule:Update(V,t,s)end game.Workspace.CurrentCamera.CFrame=t game.Workspace.CurrentCamera.Focus=s if c.activeTransparencyController then c.activeTransparencyController:Update()end if CameraInput.getInputEnabled()then CameraInput.resetInputForFrameEnd()end end end | --[[
Main RenderStep Update. The camera controller and occlusion module both have opportunities
to set and modify (respectively) the CFrame and Focus before it is set once on CurrentCamera.
The camera and occlusion modules should only return CFrames, not set the CFrame property of
CurrentCamera directly.
--]]
function CameraModule:Update(dt)
if self.activeCameraController then
self.activeCameraController:UpdateMouseBehavior()
local newCameraCFrame, newCameraFocus = self.activeCameraController:Update(dt)
if not FFlagUserFlagEnableNewVRSystem then
self.activeCameraController:ApplyVRTransform()
end
if self.activeOcclusionModule then
newCameraCFrame, newCameraFocus = self.activeOcclusionModule:Update(dt, newCameraCFrame, newCameraFocus)
end
-- Here is where the new CFrame and Focus are set for this render frame
game.Workspace.CurrentCamera.CFrame = newCameraCFrame
game.Workspace.CurrentCamera.Focus = newCameraFocus
-- Update to character local transparency as needed based on camera-to-subject distance
if self.activeTransparencyController then
self.activeTransparencyController:Update()
end
if CameraInput.getInputEnabled() then
CameraInput.resetInputForFrameEnd()
end
end
end
|
if not RunService:IsRunning()then return function(V)return Promise.resolved(GetRemoteEvent(V))end elseif RunService:IsServer()then return function(V)return Promise.resolved(GetRemoteEvent(V))end else return function(V)assert(type(V)=="\115\116\114\105\110\103","\066\097\100 \110\097\109\101")local c=ReplicatedStorage:FindFirstChild(ResourceConstants.REMOTE_EVENT_STORAGE_NAME)if c then local t=c:FindFirstChild(V)if t then return Promise.resolved(t)end end return Promise.spawn(function(c,t)c(GetRemoteEvent(V))end)end end | --[=[
Like [GetRemoteEvent] but in promise form.
@function PromiseGetRemoteEvent
@within PromiseGetRemoteEvent
@param name string
@return Promise<RemoteEvent>
]=]
if not RunService:IsRunning() then
-- Handle testing
return function(name)
return Promise.resolved(GetRemoteEvent(name))
end
elseif RunService:IsServer() then
return function(name)
return Promise.resolved(GetRemoteEvent(name))
end
else -- RunService:IsClient()
return function(name)
assert(type(name) == "string", "Bad name")
local storage = ReplicatedStorage:FindFirstChild(ResourceConstants.REMOTE_EVENT_STORAGE_NAME)
if storage then
local obj = storage:FindFirstChild(name)
if obj then
return Promise.resolved(obj)
end
end
return Promise.spawn(function(resolve, _)
resolve(GetRemoteEvent(name))
end)
end
end
|
Tune.RevAccel=150 Tune.RevDecay=75 Tune.RevBounce=500 Tune.IdleThrottle=3 Tune.ClutchTol=500 | --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)
|
local function V(V,c,t)assert(c<=t,"\115\116\097\114\116\073\110\100\101\120 \109\117\115\116 \098\101 \108\101\115\115 \116\104\097\110 \111\114 \101\113\117\097\108 \116\111 \101\110\100\073\110\100\101\120")local s={}local h=1 for c=1,math.min(#V,c-1),1 do s[h]=V[c]h=h+1 end for c=t+1,#V,1 do s[h]=V[c]h=h+1 end return s end return V | --[[
Remove the range from the list starting from the index.
]]
local function removeRange(list, startIndex, endIndex)
assert(startIndex <= endIndex, "startIndex must be less than or equal to endIndex")
local new = {}
local index = 1
for i = 1, math.min(#list, startIndex - 1) do
new[index] = list[i]
index = index + 1
end
for i = endIndex + 1, #list do
new[index] = list[i]
index = index + 1
end
return new
end
return removeRange
|
This=script.Parent Elevator=This.Parent.Parent.Parent.Parent.Parent Characters=require(script.Characters)CustomLabel=require(Elevator.CustomLabel)CustomText=CustomLabel.CUSTOMFLOORLABEL;(This.Parent.Parent.Parent.Parent.Parent:WaitForChild("\070\108\111\111\114")).Changed:connect(function(V)ChangeFloor(tostring(V))end)function ChangeFloor(V)if CustomText[tonumber(V)]then V=CustomText[tonumber(V)]end SetDisplay(2,string.len(V)==2 and V:sub(1,1)or"\078\073\076")SetDisplay(3,string.len(V)==2 and V:sub(2,2)or V)end function SetDisplay(V,c)if This.Display:FindFirstChild("\077\097\116\114\105\120"..V)and Characters[c]~=nil then for c,t in pairs(Characters[c])do for s=1,5,1 do This.Display["\077\097\116\114\105\120"..V]["\082\111\119"..c]["\068"..s].Visible=t:sub(s,s)=="\049"and true or false end end end end for V=1,Displays,1 do for c=1,7,1 do for t=1,5,1 do This.Display["\077\097\116\114\105\120"..V]["\082\111\119"..c]["\068"..t].BackgroundColor3=DisplayColor end end end | ---------------------------------------------------
This = script.Parent
Elevator = This.Parent.Parent.Parent.Parent.Parent
Characters = require(script.Characters)
CustomLabel = require(Elevator.CustomLabel)
CustomText = CustomLabel["CUSTOMFLOORLABEL"]
This.Parent.Parent.Parent.Parent.Parent:WaitForChild("Floor").Changed:connect(function(floor)
--custom indicator code--
ChangeFloor(tostring(floor))
end)
function ChangeFloor(SF)
if CustomText[tonumber(SF)] then
SF = CustomText[tonumber(SF)]
end
SetDisplay(2, (string.len(SF) == 2 and SF:sub(1, 1) or "NIL"))
SetDisplay(3, (string.len(SF) == 2 and SF:sub(2, 2) or SF))
end
function SetDisplay(ID, CHAR)
if This.Display:FindFirstChild("Matrix" .. ID) and Characters[CHAR] ~= nil then
for i, l in pairs(Characters[CHAR]) do
for r = 1, 5 do
This.Display["Matrix" .. ID]["Row" .. i]["D" .. r].Visible = (l:sub(r, r) == "1" and true or false)
end
end
end
end
for M = 1, Displays do
for R = 1, 7 do
for D = 1, 5 do
This.Display["Matrix" .. M]["Row" .. R]["D" .. D].BackgroundColor3 = DisplayColor
end
end
end
|
gunrecoil=-0.5 camrecoil=.5 AimGunRecoil=-0.5 AimCamRecoil=.13 CamShake=.5 AimCamShake=.5 Kickback=1 AimKickback=.5 | --// Recoil Settings
gunrecoil = -0.5 -- How much the gun recoils backwards when not aiming
camrecoil = 0.5 -- How much the camera flicks when not aiming
AimGunRecoil = -0.5 -- How much the gun recoils backwards when aiming
AimCamRecoil = 0.13 -- How much the camera flicks when aiming
CamShake = 0.5 -- THIS IS NEW!!!! CONTROLS CAMERA SHAKE WHEN FIRING
AimCamShake = 0.5 -- THIS IS ALSO NEW!!!!
Kickback = 1 -- Upward gun rotation when not aiming
AimKickback = 0.5 -- Upward gun rotation when aiming
|
function stopAllAnimations()local V=currentAnim if emoteNames[V]~=nil and emoteNames[V]==false then V="\105\100\108\101"end currentAnim=""currentAnimInstance=nil if currentAnimKeyframeHandler~=nil then currentAnimKeyframeHandler:disconnect()end if currentAnimTrack~=nil then currentAnimTrack:Stop()currentAnimTrack:Destroy()currentAnimTrack=nil end return V end function setAnimationSpeed(V)if V~=currentAnimSpeed then currentAnimSpeed=V currentAnimTrack:AdjustSpeed(currentAnimSpeed)end end function keyFrameReachedFunc(V)if V=="\069\110\100"then local V=currentAnim if emoteNames[V]~=nil and emoteNames[V]==false then V="\105\100\108\101"end local c=currentAnimSpeed playAnimation(V,.0,Humanoid)setAnimationSpeed(c)end end | -- functions
function stopAllAnimations()
local oldAnim = currentAnim
-- return to idle if finishing an emote
if emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false then
oldAnim = "idle"
end
currentAnim = ""
currentAnimInstance = nil
if currentAnimKeyframeHandler ~= nil then
currentAnimKeyframeHandler:disconnect()
end
if currentAnimTrack ~= nil then
currentAnimTrack:Stop()
currentAnimTrack:Destroy()
currentAnimTrack = nil
end
return oldAnim
end
function setAnimationSpeed(speed)
if speed ~= currentAnimSpeed then
currentAnimSpeed = speed
currentAnimTrack:AdjustSpeed(currentAnimSpeed)
end
end
function keyFrameReachedFunc(frameName)
if frameName == "End" then
local repeatAnim = currentAnim
-- return to idle if finishing an emote
if emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false then
repeatAnim = "idle"
end
local animSpeed = currentAnimSpeed
playAnimation(repeatAnim, 0.0, Humanoid)
setAnimationSpeed(animSpeed)
end
end
|
function CameraUtils.map(V,c,t,s,h)return((V-c)*(h-s))/(t-c)+s end | -- map a value from one range to another
function CameraUtils.map(x, inMin, inMax, outMin, outMax)
return (x - inMin) * (outMax - outMin) / (inMax - inMin) + outMin
end
|
local V,c,t=true,false,{}local s={[58]={{72;71;61;59,41;30,56,58};V};[49]={{72,71,61;59,41,39,35,34;32,31,29;28,44;45;49},V};[16]={t,c},[19]={{72,71,61;59,41;30,56,58;20;19};V};[59]={{72,71,61;59},V};[63]={{72,71;61,59,41;30;56,58,23,62;63};V},[34]={{72,71;61,59,41;39,35,34},V},[21]={{72,71,61;59,41;30,56;58;20,21};V};[48]={{72;71,61;59;41;39,35;34,32;31;29;28,44;45;49;48},V},[27]={{72;71;61;59,41;39,35,34;32,31;29,28,27};V},[14]={t,c},[31]={{72,71;61;59;41,39;35;34,32;31},V};[56]={{72,71;61,59,41,30;56},V},[29]={{72;71;61;59;41,39;35,34,32,31,29};V},[13]={t,c};[47]={{72,71;61,59;41,39,35,34,32;31;29;28,44,45;49;48,47},V},[12]={t;c};[45]={{72,71,61,59;41,39;35;34,32;31;29;28;44,45},V},[57]={{72,71,61;59,41;30;56,57};V};[36]={{72;71;61;59;41;39;35;37,36};V},[25]={{72,71;61;59,41;39;35;34;32;31,29,28,27;26,25};V};[71]={{72,71},V},[20]={{72,71,61;59;41;30;56,58;20},V},[60]={{72;71;61,60},V};[8]={t;c},[4]={t;c};[75]={{72;76,73,75},V};[22]={{72;71;61,59;41;30;56,58;20;21,22},V},[74]={{72;76,73,74};V},[62]={{72;71,61,59;41;30;56,58,23,62};V},[1]={t;c};[6]={t,c},[11]={t;c};[15]={t,c},[37]={{72,71,61;59,41,39,35,37};V};[2]={t,c},[35]={{72,71;61;59,41,39,35};V};[53]={{72,71,61;59;41,39;35;34,32;31,29;28,44;45,49;48,47,52;53};V};[73]={{72,76,73},V};[72]={{72},V};[33]={{72,71;61;59,41,39,35;37;36;33};V};[69]={{72,71;61,69},V},[65]={{72,71,61;59;41,30,56;58,20,19;66,64,65},V};[26]={{72,71,61,59,41;39;35;34;32,31;29,28;27,26},V},[68]={{72,71,61,59,41,30;56;58;20,19;66,64,67,68},V};[76]={{72;76},V},[50]={{72;71,61,59,41;39;35;34,32,31;29,28;44,45;49,48;47,50};V},[66]={{72;71;61;59,41,30,56;58;20,19,66},V};[10]={t;c},[24]={{72,71,61;59;41;39,35,34,32;31;29;28,27,26;25;24},V},[23]={{72;71;61,59;41,30,56,58;23},V};[44]={{72;71,61,59;41;39,35,34;32;31,29;28,44},V};[39]={{72;71,61;59;41,39},V},[32]={{72;71;61;59,41;39;35,34;32};V},[3]={t,c};[30]={{72;71;61,59,41,30},V};[51]={{72;71;61;59;41,39;35,34;32;31;29,28,44,45,49,48,47,50,51};V},[18]={t;c};[67]={{72;71;61,59;41;30;56,58;20,19,66;64,67},V},[61]={{72,71,61};V};[55]={{72,71;61;59,41;39;35;34,32;31;29;28,44;45;49,48;47,52;53,54;55};V},[46]={{72,71;61;59;41,39,35;34;32,31;29;28;44,45;49;48;47;46};V},[42]={{72,71,61;59;41,39;40;38;42};V},[40]={{72;71;61;59,41;39,40},V},[52]={{72,71,61,59,41,39;35,34,32,31;29;28,44;45,49;48,47;52};V},[54]={{72,71;61;59;41,39,35,34;32;31,29,28,44,45,49,48,47;52,53;54};V},[43]={t,c},[7]={t;c};[9]={t,c},[41]={{72,71,61,59,41};V},[17]={t,c},[38]={{72;71;61,59;41;39;40,38},V};[28]={{72;71,61;59;41;39;35,34;32;31,29;28};V};[5]={t,c};[64]={{72;71;61,59,41,30,56,58,20;19,66;64};V}}return s | --Precalculated paths
local t, f, n = true, false, {}
local r = {
[58] = { { 72, 71, 61, 59, 41, 30, 56, 58 }, t },
[49] = { { 72, 71, 61, 59, 41, 39, 35, 34, 32, 31, 29, 28, 44, 45, 49 }, t },
[16] = { n, f },
[19] = { { 72, 71, 61, 59, 41, 30, 56, 58, 20, 19 }, t },
[59] = { { 72, 71, 61, 59 }, t },
[63] = { { 72, 71, 61, 59, 41, 30, 56, 58, 23, 62, 63 }, t },
[34] = { { 72, 71, 61, 59, 41, 39, 35, 34 }, t },
[21] = { { 72, 71, 61, 59, 41, 30, 56, 58, 20, 21 }, t },
[48] = { { 72, 71, 61, 59, 41, 39, 35, 34, 32, 31, 29, 28, 44, 45, 49, 48 }, t },
[27] = { { 72, 71, 61, 59, 41, 39, 35, 34, 32, 31, 29, 28, 27 }, t },
[14] = { n, f },
[31] = { { 72, 71, 61, 59, 41, 39, 35, 34, 32, 31 }, t },
[56] = { { 72, 71, 61, 59, 41, 30, 56 }, t },
[29] = { { 72, 71, 61, 59, 41, 39, 35, 34, 32, 31, 29 }, t },
[13] = { n, f },
[47] = { { 72, 71, 61, 59, 41, 39, 35, 34, 32, 31, 29, 28, 44, 45, 49, 48, 47 }, t },
[12] = { n, f },
[45] = { { 72, 71, 61, 59, 41, 39, 35, 34, 32, 31, 29, 28, 44, 45 }, t },
[57] = { { 72, 71, 61, 59, 41, 30, 56, 57 }, t },
[36] = { { 72, 71, 61, 59, 41, 39, 35, 37, 36 }, t },
[25] = { { 72, 71, 61, 59, 41, 39, 35, 34, 32, 31, 29, 28, 27, 26, 25 }, t },
[71] = { { 72, 71 }, t },
[20] = { { 72, 71, 61, 59, 41, 30, 56, 58, 20 }, t },
[60] = { { 72, 71, 61, 60 }, t },
[8] = { n, f },
[4] = { n, f },
[75] = { { 72, 76, 73, 75 }, t },
[22] = { { 72, 71, 61, 59, 41, 30, 56, 58, 20, 21, 22 }, t },
[74] = { { 72, 76, 73, 74 }, t },
[62] = { { 72, 71, 61, 59, 41, 30, 56, 58, 23, 62 }, t },
[1] = { n, f },
[6] = { n, f },
[11] = { n, f },
[15] = { n, f },
[37] = { { 72, 71, 61, 59, 41, 39, 35, 37 }, t },
[2] = { n, f },
[35] = { { 72, 71, 61, 59, 41, 39, 35 }, t },
[53] = { { 72, 71, 61, 59, 41, 39, 35, 34, 32, 31, 29, 28, 44, 45, 49, 48, 47, 52, 53 }, t },
[73] = { { 72, 76, 73 }, t },
[72] = { { 72 }, t },
[33] = { { 72, 71, 61, 59, 41, 39, 35, 37, 36, 33 }, t },
[69] = { { 72, 71, 61, 69 }, t },
[65] = { { 72, 71, 61, 59, 41, 30, 56, 58, 20, 19, 66, 64, 65 }, t },
[26] = { { 72, 71, 61, 59, 41, 39, 35, 34, 32, 31, 29, 28, 27, 26 }, t },
[68] = { { 72, 71, 61, 59, 41, 30, 56, 58, 20, 19, 66, 64, 67, 68 }, t },
[76] = { { 72, 76 }, t },
[50] = { { 72, 71, 61, 59, 41, 39, 35, 34, 32, 31, 29, 28, 44, 45, 49, 48, 47, 50 }, t },
[66] = { { 72, 71, 61, 59, 41, 30, 56, 58, 20, 19, 66 }, t },
[10] = { n, f },
[24] = { { 72, 71, 61, 59, 41, 39, 35, 34, 32, 31, 29, 28, 27, 26, 25, 24 }, t },
[23] = { { 72, 71, 61, 59, 41, 30, 56, 58, 23 }, t },
[44] = { { 72, 71, 61, 59, 41, 39, 35, 34, 32, 31, 29, 28, 44 }, t },
[39] = { { 72, 71, 61, 59, 41, 39 }, t },
[32] = { { 72, 71, 61, 59, 41, 39, 35, 34, 32 }, t },
[3] = { n, f },
[30] = { { 72, 71, 61, 59, 41, 30 }, t },
[51] = { { 72, 71, 61, 59, 41, 39, 35, 34, 32, 31, 29, 28, 44, 45, 49, 48, 47, 50, 51 }, t },
[18] = { n, f },
[67] = { { 72, 71, 61, 59, 41, 30, 56, 58, 20, 19, 66, 64, 67 }, t },
[61] = { { 72, 71, 61 }, t },
[55] = { { 72, 71, 61, 59, 41, 39, 35, 34, 32, 31, 29, 28, 44, 45, 49, 48, 47, 52, 53, 54, 55 }, t },
[46] = { { 72, 71, 61, 59, 41, 39, 35, 34, 32, 31, 29, 28, 44, 45, 49, 48, 47, 46 }, t },
[42] = { { 72, 71, 61, 59, 41, 39, 40, 38, 42 }, t },
[40] = { { 72, 71, 61, 59, 41, 39, 40 }, t },
[52] = { { 72, 71, 61, 59, 41, 39, 35, 34, 32, 31, 29, 28, 44, 45, 49, 48, 47, 52 }, t },
[54] = { { 72, 71, 61, 59, 41, 39, 35, 34, 32, 31, 29, 28, 44, 45, 49, 48, 47, 52, 53, 54 }, t },
[43] = { n, f },
[7] = { n, f },
[9] = { n, f },
[41] = { { 72, 71, 61, 59, 41 }, t },
[17] = { n, f },
[38] = { { 72, 71, 61, 59, 41, 39, 40, 38 }, t },
[28] = { { 72, 71, 61, 59, 41, 39, 35, 34, 32, 31, 29, 28 }, t },
[5] = { n, f },
[64] = { { 72, 71, 61, 59, 41, 30, 56, 58, 20, 19, 66, 64 }, t },
}
return r
|
Trigger.MouseClick:Connect(function(V)if not Settings.OnCD then local c=V.Backpack local t=V.StarterGear for V,c in pairs(c:GetChildren())do if c then c:Destroy()end end for V,c in pairs(t:GetChildren())do if c then c:Destroy()end end local s=(Tools:FindFirstChild(Gun.Name)):Clone();(s:Clone()).Parent=c;(s:Clone()).Parent=t end end) | --//Controller//--
Trigger.MouseClick:Connect(function(Player)
if not Settings.OnCD then
local Backpack = Player.Backpack
local StarterGear = Player.StarterGear
for _, Tool in pairs(Backpack:GetChildren()) do
if Tool then
Tool:Destroy()
end
end
for _, Tool in pairs(StarterGear:GetChildren()) do
if Tool then
Tool:Destroy()
end
end
local Tool = Tools:FindFirstChild(Gun.Name):Clone()
Tool:Clone().Parent = Backpack
Tool:Clone().Parent = StarterGear
end
end)
|
Tune.TransModes={"\083\101\109\105"}Tune.AutoShiftMode="\083\112\101\101\100"Tune.AutoUpThresh=-200 Tune.AutoDownThresh=2000 Tune.FinalDrive=3.84 Tune.Ratios={3.42,0;4.37;2.76;1.94,1.45;1.05,.85,.69}Tune.FDMult=1 | --[[Transmission]]
Tune.TransModes = { "Semi" } --"Auto", "Semi", or "Manual". Can have more than one; order from first to last
--Automatic Settings
Tune.AutoShiftMode = "Speed" --"Speed" or "RPM"
Tune.AutoUpThresh = -200 --Automatic upshift point (relative to peak RPM, positive = Over-rev)
Tune.AutoDownThresh = 2000 --Automatic downshift point (relative to peak RPM, positive = Under-rev)
--Gear Ratios
Tune.FinalDrive = 3.84
-- Gearing determines top speed and wheel torque
Tune.Ratios = { -- Higher ratio = more torque, Lower ratio = higher top speed
--[[Reverse]]
3.42, -- Copy and paste a ratio to add a gear
--[[Neutral]]
0, -- Ratios can also be deleted
--[[ 1 ]]
4.37, -- Reverse, Neutral, and 1st gear are required
--[[ 2 ]]
2.76,
--[[ 3 ]]
1.94,
--[[ 4 ]]
1.45,
--[[ 5 ]]
1.05,
--[[ 6 ]]
0.85,
--[[ 7 ]]
0.69,
}
Tune.FDMult = 1 -- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
|
while true do R.BrickColor=BrickColor.new("\067\071\065 \098\114\111\119\110")wait(.3)R.BrickColor=BrickColor.new("\082\101\097\108\108\121 \098\108\097\099\107")wait(.3)end | -------------------------
while true do
R.BrickColor = BrickColor.new("CGA brown")
wait(0.3)
R.BrickColor = BrickColor.new("Really black")
wait(0.3)
end
|
Tune.Horsepower=1400 Tune.IdleRPM=600 Tune.PeakRPM=7000 Tune.Redline=8100 Tune.EqPoint=7000 Tune.PeakSharpness=9.4 Tune.CurveMult=0 Tune.InclineComp=1.7 Tune.RevAccel=450 Tune.RevDecay=75 Tune.RevBounce=500 Tune.IdleThrottle=3 Tune.ClutchTol=500 | --[[Engine]]
--Torque Curve
Tune.Horsepower = 1400
Tune.IdleRPM = 600
Tune.PeakRPM = 7000
Tune.Redline = 8100
Tune.EqPoint = 7000
Tune.PeakSharpness = 9.4
Tune.CurveMult = 0
--Incline Compensation
Tune.InclineComp = 1.7 -- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
--Misc
Tune.RevAccel = 450 -- 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)
|
local V=game:GetService("\080\108\097\121\101\114\115")local c=game:GetService("\082\117\110\083\101\114\118\105\099\101")local t={Climbing={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\102\111\111\116\115\116\101\112\115\095\112\108\097\115\116\105\099\046\109\112\051",Looped=true};Died={SoundId="\114\098\120\097\115\115\101\116\058\047\047\115\111\117\110\100\115\047\117\117\104\104\104\046\109\112\051"};FreeFalling={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\102\097\108\108\105\110\103\046\109\112\051";Looped=true},GettingUp={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\103\101\116\095\117\112\046\109\112\051"};Jumping={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\106\117\109\112\046\109\112\051"};Landing={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\106\117\109\112\095\108\097\110\100\046\109\112\051"},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 s(...)local V=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")local c={...}local function t(...)for V=1,#c,1 do c[V]:Disconnect()end return V:Fire(...)end for V=1,#c,1 do c[V]=c[V]:Connect(t)end return V.Event:Wait()end | -- Roblox character sound script
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local SOUND_DATA = {
Climbing = {
SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3",
Looped = true,
},
Died = {
SoundId = "rbxasset://sounds/uuhhh.mp3",
},
FreeFalling = {
SoundId = "rbxasset://sounds/action_falling.mp3",
Looped = true,
},
GettingUp = {
SoundId = "rbxasset://sounds/action_get_up.mp3",
},
Jumping = {
SoundId = "rbxasset://sounds/action_jump.mp3",
},
Landing = {
SoundId = "rbxasset://sounds/action_jump_land.mp3",
},
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
|
function angleBetweenPoints(V,c)local t=V-c return-math.atan2(t.z,t.x)end function getCameraAngle(V)local c,t=V.CoordinateFrame,V.Focus return angleBetweenPoints(c.p,t.p)end | -- Helper functions
function angleBetweenPoints(p0, p1)
local p = p0 - p1
return -math.atan2(p.z, p.x)
end
function getCameraAngle(camera)
local cf, f = camera.CoordinateFrame, camera.Focus
return angleBetweenPoints(cf.p, f.p)
end
|
return function(V,c)if c then setfenv(1,c)end local t=client.UI.Prepare(script.Parent.Parent)local s=service.PlayerGui local h=t.Frame local p=t.Frame.Message local U=t.Frame.Title local C=V.gIndex local r=V.gTable local q=V.Title local u=V.Message local L=V.Scroll local D=V.Time if not V.Message or not V.Title then t:Destroy()end U.Text=q p.Text=u U.TextTransparency=1 p.TextTransparency=1 U.TextStrokeTransparency=1 p.TextStrokeTransparency=1 h.BackgroundTransparency=1 local I=service.New("\066\108\117\114\069\102\102\101\099\116")I.Enabled=false I.Size=0 I.Parent=workspace.CurrentCamera local d=10 local Y=10 local l=.1 local f=.5 local A=.3 local S=Y/d local N=A/d local T=.1 local B=.1 local m=false local function K()if not m then I.Enabled=true r:Ready()for V=1,d,1 do if I.Size<Y then I.Size=I.Size+S end if p.TextTransparency>l then p.TextTransparency=p.TextTransparency-T U.TextTransparency=U.TextTransparency-T end if p.TextStrokeTransparency>f then p.TextStrokeTransparency=p.TextStrokeTransparency-B U.TextStrokeTransparency=U.TextStrokeTransparency-B end if h.BackgroundTransparency>A then h.BackgroundTransparency=h.BackgroundTransparency-N end wait(.016666666666667)end end end local function g()if not m then for V=1,d,1 do if I.Size>0 then I.Size=I.Size-S end if p.TextTransparency<1 then p.TextTransparency=p.TextTransparency+T U.TextTransparency=U.TextTransparency+T end if p.TextStrokeTransparency<1 then p.TextStrokeTransparency=p.TextStrokeTransparency+B U.TextStrokeTransparency=U.TextStrokeTransparency+B end if h.BackgroundTransparency<1 then h.BackgroundTransparency=h.BackgroundTransparency+N end wait(.016666666666667)end I.Enabled=false I:Destroy();(service.UnWrap(t)):Destroy()m=true end end r.CustomDestroy=function()if not m then m=true pcall(g)end pcall(function()(service.UnWrap(t)):Destroy()end)pcall(function()I:Destroy()end)end K()wait(D or 5)if not m then g()end end | --// All global vars will be wiped/replaced except script
return function(data, env)
if env then
setfenv(1, env)
end
local gui = client.UI.Prepare(script.Parent.Parent) -- Change it to a TextLabel to avoid chat clearing
local playergui = service.PlayerGui
local frame = gui.Frame
local msg = gui.Frame.Message
local ttl = gui.Frame.Title
local gIndex = data.gIndex
local gTable = data.gTable
local title = data.Title
local message = data.Message
local scroll = data.Scroll
local tim = data.Time
if not data.Message or not data.Title then
gui:Destroy()
end
ttl.Text = title
msg.Text = message
ttl.TextTransparency = 1
msg.TextTransparency = 1
ttl.TextStrokeTransparency = 1
msg.TextStrokeTransparency = 1
frame.BackgroundTransparency = 1
local blur = service.New("BlurEffect")
blur.Enabled = false
blur.Size = 0
blur.Parent = workspace.CurrentCamera
local fadeSteps = 10
local blurSize = 10
local textFade = 0.1
local strokeFade = 0.5
local frameFade = 0.3
local blurStep = blurSize / fadeSteps
local frameStep = frameFade / fadeSteps
local textStep = 0.1
local strokeStep = 0.1
local gone = false
local function fadeIn()
if not gone then
blur.Enabled = true
gTable:Ready()
--gui.Parent = service.PlayerGui
for i = 1, fadeSteps do
if blur.Size < blurSize then
blur.Size = blur.Size + blurStep
end
if msg.TextTransparency > textFade then
msg.TextTransparency = msg.TextTransparency - textStep
ttl.TextTransparency = ttl.TextTransparency - textStep
end
if msg.TextStrokeTransparency > strokeFade then
msg.TextStrokeTransparency = msg.TextStrokeTransparency - strokeStep
ttl.TextStrokeTransparency = ttl.TextStrokeTransparency - strokeStep
end
if frame.BackgroundTransparency > frameFade then
frame.BackgroundTransparency = frame.BackgroundTransparency - frameStep
end
wait(1 / 60)
end
end
end
local function fadeOut()
if not gone then
for i = 1, fadeSteps do
if blur.Size > 0 then
blur.Size = blur.Size - blurStep
end
if msg.TextTransparency < 1 then
msg.TextTransparency = msg.TextTransparency + textStep
ttl.TextTransparency = ttl.TextTransparency + textStep
end
if msg.TextStrokeTransparency < 1 then
msg.TextStrokeTransparency = msg.TextStrokeTransparency + strokeStep
ttl.TextStrokeTransparency = ttl.TextStrokeTransparency + strokeStep
end
if frame.BackgroundTransparency < 1 then
frame.BackgroundTransparency = frame.BackgroundTransparency + frameStep
end
wait(1 / 60)
end
blur.Enabled = false
blur:Destroy()
service.UnWrap(gui):Destroy()
gone = true
end
end
gTable.CustomDestroy = function()
if not gone then
gone = true
pcall(fadeOut)
end
pcall(function()
service.UnWrap(gui):Destroy()
end)
pcall(function()
blur:Destroy()
end)
end
--[[if not scroll then
msg.Text = message
else
Routine(function()
wait(0.5)
for i = 1, #message do
msg.Text = msg.Text .. message:sub(i,i)
wait(0.05)
end
end)
end--]]
-- For now?
fadeIn()
wait(tim or 5)
if not gone then
fadeOut()
end
--[[
frame.Position = UDim2.new(0.5,-175,-1.5,0)
gui.Parent = playergui
frame:TweenPosition(UDim2.new(0.5,-175,0.25,0),nil,nil,0.5)
if not scroll then
msg.Text = message
wait(tim or 10)
else
wait(0.5)
for i = 1, #message do
msg.Text = msg.Text .. message:sub(i,i)
wait(0.05)
end
wait(tim or 5)
end
if frame then
frame:TweenPosition(UDim2.new(0.5,-175,-1.5,0),nil,nil,0.5)
wait(1)
gui:Destroy()
end
--]]
end
|
local V=(game:GetService("\082\117\110\083\101\114\118\105\099\101")):IsStudio();(game:GetService("\078\101\116\119\111\114\107\067\108\105\101\110\116")).ChildRemoved:Connect(function(c)if not V then warn("~\033 \080\076\065\089\069\082 \068\073\083\067\079\078\078\069\067\084\069\068\047\075\073\067\075\069\068\033 \068\085\077\080\073\078\071 \065\068\079\078\073\083 \067\076\073\069\078\084 \076\079\071\033")dumplog()end end)local c={}local t=getfenv()setfenv(1,setmetatable({},{__metatable=c})) | --// Dump log on disconnect
local isStudio = game:GetService("RunService"):IsStudio()
game:GetService("NetworkClient").ChildRemoved:Connect(function(p)
if not isStudio then
warn("~! PLAYER DISCONNECTED/KICKED! DUMPING ADONIS CLIENT LOG!")
dumplog()
end
end)
local unique = {}
local origEnv = getfenv()
setfenv(1, setmetatable({}, { __metatable = unique }))
|
local V=_Tune.Controls local c=Instance.new("\070\111\108\100\101\114",script.Parent)c.Name="\067\111\110\116\114\111\108\115"for t,s in pairs(V)do local h=Instance.new("\083\116\114\105\110\103\086\097\108\117\101",c)h.Name=t h.Value=s.Name h.Changed:connect(function()if t=="\077\111\117\115\101\084\104\114\111\116\116\108\101"or t=="\077\111\117\115\101\066\114\097\107\101"then if h.Value=="\077\111\117\115\101\066\117\116\116\111\110\049"or h.Value=="\077\111\117\115\101\066\117\116\116\111\110\050"then V[t]=Enum.UserInputType[h.Value]else V[t]=Enum.KeyCode[h.Value]end else V[t]=Enum.KeyCode[h.Value]end end)end | --[[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
|
local V={}function module.ApplyBundle(s,c,t)local h=V[t]if not h then local c,s=pcall(function()return main.assetService:GetBundleDetailsAsync(t)end)if c and s then for s,p in next,s.Items do if p.Type=="\085\115\101\114\079\117\116\102\105\116"then c,h=pcall(function()return main.players:GetHumanoidDescriptionFromOutfitId(p.Id)end)V[t]=h break end end end end if not h then return end local p=c:GetAppliedDescription()local U=Instance.new("\072\117\109\097\110\111\105\100\068\101\115\099\114\105\112\116\105\111\110")for V,c in next,{"\066\097\099\107\065\099\099\101\115\115\111\114\121";"\066\111\100\121\084\121\112\101\083\099\097\108\101","\067\108\105\109\098\065\110\105\109\097\116\105\111\110";"\068\101\112\116\104\083\099\097\108\101";"\070\097\099\101";"\070\097\099\101\065\099\099\101\115\115\111\114\121","\070\097\108\108\065\110\105\109\097\116\105\111\110";"\070\114\111\110\116\065\099\099\101\115\115\111\114\121","\071\114\097\112\104\105\099\084\083\104\105\114\116","\072\097\105\114\065\099\099\101\115\115\111\114\121";"\072\097\116\065\099\099\101\115\115\111\114\121";"\072\101\097\100";"\072\101\097\100\067\111\108\111\114";"\072\101\097\100\083\099\097\108\101","\072\101\105\103\104\116\083\099\097\108\101","\073\100\108\101\065\110\105\109\097\116\105\111\110";"\074\117\109\112\065\110\105\109\097\116\105\111\110","\076\101\102\116\065\114\109","\076\101\102\116\065\114\109\067\111\108\111\114","\076\101\102\116\076\101\103","\076\101\102\116\076\101\103\067\111\108\111\114";"\078\101\099\107\065\099\099\101\115\115\111\114\121","\080\097\110\116\115","\080\114\111\112\111\114\116\105\111\110\083\099\097\108\101";"\082\105\103\104\116\065\114\109","\082\105\103\104\116\065\114\109\067\111\108\111\114";"\082\105\103\104\116\076\101\103";"\082\105\103\104\116\076\101\103\067\111\108\111\114","\082\117\110\065\110\105\109\097\116\105\111\110";"\083\104\105\114\116","\083\104\111\117\108\100\101\114\115\065\099\099\101\115\115\111\114\121","\083\119\105\109\065\110\105\109\097\116\105\111\110","\084\111\114\115\111";"\084\111\114\115\111\067\111\108\111\114";"\087\097\105\115\116\065\099\099\101\115\115\111\114\121","\087\097\108\107\065\110\105\109\097\116\105\111\110","\087\105\100\116\104\083\099\097\108\101"}do if h[c]~=U[c]then p[c]=h[c]end end c:ApplyDescription(p)end return module | --[[
for a,b in pairs(game.ServerScriptService.MainModule.Server.Morphs:GetDescendants()) do
if b:IsA("Decal") and b.Name ~= "face" and b.Parent.Name == "Head" then
print("CHANGED: ".. b.Name.." | "..b.Parent.Parent.Name)
b.Name = "face"
end
end
--]]
local bundleCache = {} -- cache HumanoidDescriptions retrieved from bundles to reduce API calls
function module:ApplyBundle(humanoid, bundleId)
local HumanoidDescription = bundleCache[bundleId]
if not HumanoidDescription then
local success, bundleDetails = pcall(function()
return main.assetService:GetBundleDetailsAsync(bundleId)
end)
if success and bundleDetails then
for _, item in next, bundleDetails.Items do
if item.Type == "UserOutfit" then
success, HumanoidDescription = pcall(function()
return main.players:GetHumanoidDescriptionFromOutfitId(item.Id)
end)
bundleCache[bundleId] = HumanoidDescription
break
end
end
end
end
if not HumanoidDescription then
return
end
local newDescription = humanoid:GetAppliedDescription()
local defaultDescription = Instance.new("HumanoidDescription")
for _, property in
next,
{
"BackAccessory",
"BodyTypeScale",
"ClimbAnimation",
"DepthScale",
"Face",
"FaceAccessory",
"FallAnimation",
"FrontAccessory",
"GraphicTShirt",
"HairAccessory",
"HatAccessory",
"Head",
"HeadColor",
"HeadScale",
"HeightScale",
"IdleAnimation",
"JumpAnimation",
"LeftArm",
"LeftArmColor",
"LeftLeg",
"LeftLegColor",
"NeckAccessory",
"Pants",
"ProportionScale",
"RightArm",
"RightArmColor",
"RightLeg",
"RightLegColor",
"RunAnimation",
"Shirt",
"ShouldersAccessory",
"SwimAnimation",
"Torso",
"TorsoColor",
"WaistAccessory",
"WalkAnimation",
"WidthScale",
}
do
if HumanoidDescription[property] ~= defaultDescription[property] then -- property is not the default value
newDescription[property] = HumanoidDescription[property]
end
end
humanoid:ApplyDescription(newDescription)
end
return module
|
local V=script.Parent.Parent.Parent.Parent.Parent.DockShelf local c=script.Parent.Parent.Parent.Parent.Parent.WindowManager.CtxtMenu local t=c.About local s=script.Parent local h=script.Parent.Parent.Parent | -- Get references to the DockShelf and its children
local dockShelf = script.Parent.Parent.Parent.Parent.Parent.DockShelf
local shlf = script.Parent.Parent.Parent.Parent.Parent.WindowManager.CtxtMenu
local aFinderButton = shlf.About
local Minimalise = script.Parent
local window = script.Parent.Parent.Parent
|
local V=game:GetService("\083\111\117\110\100\083\101\114\118\105\099\101")local c=game:GetService("\082\117\110\083\101\114\118\105\099\101");(script:WaitForChild("\070\111\111\116\115\116\101\112\083\111\117\110\100\115")).Parent=V local t=V:WaitForChild("\070\111\111\116\115\116\101\112\083\111\117\110\100\115")local s=game.Players.LocalPlayer repeat wait()until s.Character local h=s.Character local p=h.HumanoidRootPart local U=h.Humanoid local C U.Running:connect(function(V)if V>U.WalkSpeed/2 then C=true else C=false end end)function getMaterial()local V=U.FloorMaterial if not V then V="\065\105\114"end local c=(string.split(tostring(V),"\069\110\117\109\046\077\097\116\101\114\105\097\108\046"))[2]local t=c return t end local r c.Heartbeat:connect(function()if C then local V=getMaterial()if V~=r and r~=nil then t[r].Playing=false end local c=t[V]c.PlaybackSpeed=U.WalkSpeed/12 c.Playing=true r=V else for V,c in pairs(t:GetChildren())do c.Playing=false end end end) | --PUT THIS SCRIPT IN STARTERPACK, STOP DISLIKING IT BECAUSE YOU DIDN'T USE IT RIGHT
local sounds = game:GetService("SoundService")
local runtime = game:GetService("RunService")
script:WaitForChild("FootstepSounds").Parent = sounds
local materials = sounds:WaitForChild("FootstepSounds")
local plr = game.Players.LocalPlayer
repeat
wait()
until plr.Character
local char = plr.Character
local hrp = char.HumanoidRootPart
local hum = char.Humanoid
local walking
hum.Running:connect(function(speed)
if speed > hum.WalkSpeed / 2 then
walking = true
else
walking = false
end
end)
function getMaterial()
local floormat = hum.FloorMaterial
if not floormat then
floormat = "Air"
end
local matstring = string.split(tostring(floormat), "Enum.Material.")[2]
local material = matstring
return material
end
local lastmat
runtime.Heartbeat:connect(function()
if walking then
local material = getMaterial()
if material ~= lastmat and lastmat ~= nil then
materials[lastmat].Playing = false
end
local materialSound = materials[material]
materialSound.PlaybackSpeed = hum.WalkSpeed / 12
materialSound.Playing = true
lastmat = material
else
for _, sound in pairs(materials:GetChildren()) do
sound.Playing = false
end
end
end)
|
Tune.SusEnabled=true Tune.FSusDamping=500 Tune.FSusStiffness=9000 Tune.FAntiRoll=50 Tune.FSusLength=1 Tune.FPreCompress=.3 Tune.FExtensionLim=.3 Tune.FCompressLim=.1 Tune.FSusAngle=80 Tune.FWsBoneLen=5 Tune.FWsBoneAngle=0 Tune.FAnchorOffset={-0.4;-0.5,0}Tune.RSusDamping=500 Tune.RSusStiffness=9000 Tune.FAntiRoll=50 Tune.RSusLength=1 Tune.RPreCompress=.3 Tune.RExtensionLim=.3 Tune.RCompressLim=.1 Tune.RSusAngle=80 Tune.RWsBoneLen=5 Tune.RWsBoneAngle=0 Tune.RAnchorOffset={-0.4;-0.5;0}Tune.SusVisible=false Tune.WsBVisible=false Tune.SusRadius=.2 Tune.SusThickness=.1 Tune.SusColor="\066\114\105\103\104\116 \114\101\100"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.FAntiRoll = 50 -- Anti-Roll (Gyro Dampening)
Tune.FSusLength = 1 -- Suspension length (in studs)
Tune.FPreCompress = 0.3 -- Pre-compression adds resting length force
Tune.FExtensionLim = 0.3 -- Max Extension Travel (in studs)
Tune.FCompressLim = 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.FAntiRoll = 50 -- Anti-Roll (Gyro Dampening)
Tune.RSusLength = 1 -- Suspension length (in studs)
Tune.RPreCompress = 0.3 -- Pre-compression adds resting length force
Tune.RExtensionLim = 0.3 -- Max Extension Travel (in studs)
Tune.RCompressLim = 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 = false -- Spring Visible
Tune.WsBVisible = false -- Wishbone Visible
Tune.SusRadius = 0.2 -- Suspension Coil Radius
Tune.SusThickness = 0.1 -- Suspension Coil Thickness
Tune.SusColor = "Bright red" -- Suspension Color [BrickColor]
Tune.SusCoilCount = 6 -- Suspension Coil Count
Tune.WsColor = "Black" -- Wishbone Color [BrickColor]
Tune.WsThickness = 0.1 -- Wishbone Rod Thickness
|
local V do local c,t=pcall(function()return(UserSettings()):IsUserFeatureEnabled("\085\115\101\114\067\097\109\101\114\097\071\097\109\101\112\097\100\090\111\111\109\070\105\120")end)V=c and t end | -- [[ Flags ]]
local FFlagUserCameraGamepadZoomFix
do
local success, result = pcall(function()
return UserSettings():IsUserFeatureEnabled("UserCameraGamepadZoomFix")
end)
FFlagUserCameraGamepadZoomFix = success and result
end
|
local V=Instance.new("\077\111\116\111\114",script.Parent.Parent.Misc.WPR.SS)V.MaxVelocity=.05 V.Part0=script.Parent.WPR V.Part1=V.Parent local c=Instance.new("\077\111\116\111\114",script.Parent.Parent.Misc.WPR2.SS)c.MaxVelocity=.05 c.Part0=script.Parent.WPR2 c.Part1=c.Parent | --//wipers
local wpr = Instance.new("Motor", script.Parent.Parent.Misc.WPR.SS)
wpr.MaxVelocity = 0.05
wpr.Part0 = script.Parent.WPR
wpr.Part1 = wpr.Parent
local wpr2 = Instance.new("Motor", script.Parent.Parent.Misc.WPR2.SS)
wpr2.MaxVelocity = 0.05
wpr2.Part0 = script.Parent.WPR2
wpr2.Part1 = wpr2.Parent
|
function Icon.bindEvent(t,V,c)local s=t[V]assert(s and(typeof(s)=="\116\097\098\108\101"and s.Connect),"\097\114\103\117\109\101\110\116\091\049\093 \109\117\115\116 \098\101 \097 \118\097\108\105\100 \116\111\112\098\097\114\112\108\117\115 \105\099\111\110 \101\118\101\110\116 \110\097\109\101\033")assert(typeof(c)=="\102\117\110\099\116\105\111\110","\097\114\103\117\109\101\110\116\091\050\093 \109\117\115\116 \098\101 \097 \102\117\110\099\116\105\111\110\033")t._bindedEvents[V]=s:Connect(function(...)c(t,...)end)return t end function Icon.unbindEvent(c,V)local t=c._bindedEvents[V]if t then t:Disconnect()c._bindedEvents[V]=nil end return c end function Icon.bindToggleKey(c,V)assert(typeof(V)=="\069\110\117\109\073\116\101\109","\097\114\103\117\109\101\110\116\091\049\093 \109\117\115\116 \098\101 \097 \075\101\121\067\111\100\101 \069\110\117\109\073\116\101\109\033")c._bindedToggleKeys[V]=true return c end function Icon.unbindToggleKey(c,V)assert(typeof(V)=="\069\110\117\109\073\116\101\109","\097\114\103\117\109\101\110\116\091\049\093 \109\117\115\116 \098\101 \097 \075\101\121\067\111\100\101 \069\110\117\109\073\116\101\109\033")c._bindedToggleKeys[V]=nil return c end function Icon.lock(V)V.locked=true return V end function Icon.unlock(V)V.locked=false return V end function Icon.setTopPadding(t,V,c)local s=V or 4 local h=c or 0 t.topPadding=UDim.new(h,s)t.updated:Fire()return t end function Icon.bindToggleItem(c,V)if not V:IsA("\071\117\105\079\098\106\101\099\116")and not V:IsA("\076\097\121\101\114\067\111\108\108\101\099\116\111\114")then error("\084\111\103\103\108\101 \105\116\101\109 \109\117\115\116 \098\101 \097 \071\117\105\079\098\106\101\099\116 \111\114 \076\097\121\101\114\067\111\108\108\101\099\116\111\114\033")end c.toggleItems[V]=true return c end function Icon.unbindToggleItem(c,V)c.toggleItems[V]=nil return c end function Icon._setToggleItemsVisible(t,V,c)for t,s in pairs(t.toggleItems)do if not c or c.toggleItems[t]==nil then local c="\086\105\115\105\098\108\101"if t:IsA("\076\097\121\101\114\067\111\108\108\101\099\116\111\114")then c="\069\110\097\098\108\101\100"end t[c]=V end end end function Icon.give(c,V)local t=V if typeof(V)=="\102\117\110\099\116\105\111\110"then local s=V(c)if typeof(V)~="\102\117\110\099\116\105\111\110"then t=s end end c._maid:give(t)return c end | -- FEATURE METHODS
function Icon:bindEvent(iconEventName, eventFunction)
local event = self[iconEventName]
assert(
event and typeof(event) == "table" and event.Connect,
"argument[1] must be a valid topbarplus icon event name!"
)
assert(typeof(eventFunction) == "function", "argument[2] must be a function!")
self._bindedEvents[iconEventName] = event:Connect(function(...)
eventFunction(self, ...)
end)
return self
end
function Icon:unbindEvent(iconEventName)
local eventConnection = self._bindedEvents[iconEventName]
if eventConnection then
eventConnection:Disconnect()
self._bindedEvents[iconEventName] = nil
end
return self
end
function Icon:bindToggleKey(keyCodeEnum)
assert(typeof(keyCodeEnum) == "EnumItem", "argument[1] must be a KeyCode EnumItem!")
self._bindedToggleKeys[keyCodeEnum] = true
return self
end
function Icon:unbindToggleKey(keyCodeEnum)
assert(typeof(keyCodeEnum) == "EnumItem", "argument[1] must be a KeyCode EnumItem!")
self._bindedToggleKeys[keyCodeEnum] = nil
return self
end
function Icon:lock()
self.locked = true
return self
end
function Icon:unlock()
self.locked = false
return self
end
function Icon:setTopPadding(offset, scale)
local newOffset = offset or 4
local newScale = scale or 0
self.topPadding = UDim.new(newScale, newOffset)
self.updated:Fire()
return self
end
function Icon:bindToggleItem(guiObjectOrLayerCollector)
if not guiObjectOrLayerCollector:IsA("GuiObject") and not guiObjectOrLayerCollector:IsA("LayerCollector") then
error("Toggle item must be a GuiObject or LayerCollector!")
end
self.toggleItems[guiObjectOrLayerCollector] = true
return self
end
function Icon:unbindToggleItem(guiObjectOrLayerCollector)
self.toggleItems[guiObjectOrLayerCollector] = nil
return self
end
function Icon:_setToggleItemsVisible(bool, byIcon)
for toggleItem, _ in pairs(self.toggleItems) do
if not byIcon or byIcon.toggleItems[toggleItem] == nil then
local property = "Visible"
if toggleItem:IsA("LayerCollector") then
property = "Enabled"
end
toggleItem[property] = bool
end
end
end
function Icon:give(userdata)
local valueToGive = userdata
if typeof(userdata) == "function" then
local returnValue = userdata(self)
if typeof(userdata) ~= "function" then
valueToGive = returnValue
end
end
self._maid:give(valueToGive)
return self
end
|
local V=true function onClicked()if V==true then V=false One()elseif V==false then V=true Two()end end script.Parent.MouseButton1Down:connect(onClicked) | -- Don't edit below unless you know what you're doing.
local O = true
function onClicked()
if O == true then
O = false
One()
elseif O == false then
O = true
Two()
end
end
script.Parent.MouseButton1Down:connect(onClicked)
|
local function V(V)return V:GetState()end | -- The script needs this to check the state to not update the Last Standing Y Position Variable.
local function getHumanoidState(h)
return h:GetState()
end
|
function module.new()local V=setmetatable({},methods)V.MessageIdCounter=0 V.ChatChannels={}V.Speakers={}V.FilterMessageFunctions=Util:NewSortedFunctionContainer()V.ProcessCommandsFunctions=Util:NewSortedFunctionContainer()V.eChannelAdded=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")V.eChannelRemoved=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")V.eSpeakerAdded=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")V.eSpeakerRemoved=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")V.ChannelAdded=V.eChannelAdded.Event V.ChannelRemoved=V.eChannelRemoved.Event V.SpeakerAdded=V.eSpeakerAdded.Event V.SpeakerRemoved=V.eSpeakerRemoved.Event V.ChatServiceMajorVersion=0 V.ChatServiceMinorVersion=5 return V end return module.new() | --///////////////////////// Constructors
--//////////////////////////////////////
function module.new()
local obj = setmetatable({}, methods)
obj.MessageIdCounter = 0
obj.ChatChannels = {}
obj.Speakers = {}
obj.FilterMessageFunctions = Util:NewSortedFunctionContainer()
obj.ProcessCommandsFunctions = Util:NewSortedFunctionContainer()
obj.eChannelAdded = Instance.new("BindableEvent")
obj.eChannelRemoved = Instance.new("BindableEvent")
obj.eSpeakerAdded = Instance.new("BindableEvent")
obj.eSpeakerRemoved = Instance.new("BindableEvent")
obj.ChannelAdded = obj.eChannelAdded.Event
obj.ChannelRemoved = obj.eChannelRemoved.Event
obj.SpeakerAdded = obj.eSpeakerAdded.Event
obj.SpeakerRemoved = obj.eSpeakerRemoved.Event
obj.ChatServiceMajorVersion = 0
obj.ChatServiceMinorVersion = 5
return obj
end
return module.new()
|
function FpsCamera.MountBaseCamera(c,V)local t=V.GetSubjectPosition c.GetBaseSubjectPosition=t if t then V.GetBaseSubjectPosition=t V.GetSubjectPosition=c.GetSubjectPosition else c:Warn("\077\111\117\110\116\066\097\115\101\067\097\109\101\114\097 - \067\111\117\108\100 \110\111\116 \102\105\110\100 \066\097\115\101\067\097\109\101\114\097\058\071\101\116\083\117\098\106\101\099\116\080\111\115\105\116\105\111\110\040\041\033")end end | -- Overloads BaseCamera:GetSubjectPosition() with
-- the GetSubjectPosition function of the FpsCamera.
function FpsCamera:MountBaseCamera(BaseCamera)
local base = BaseCamera.GetSubjectPosition
self.GetBaseSubjectPosition = base
if base then
BaseCamera.GetBaseSubjectPosition = base
BaseCamera.GetSubjectPosition = self.GetSubjectPosition
else
self:Warn("MountBaseCamera - Could not find BaseCamera:GetSubjectPosition()!")
end
end
|
local V=Players.LocalPlayer local c=V.Character or V.CharacterAdded:wait()local t=c:FindFirstChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116",true)local s=game.Workspace.CurrentCamera | -- Make variables for the player and camera
local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:wait()
local humanoidRootPart = character:FindFirstChild("HumanoidRootPart", true)
local camera = game.Workspace.CurrentCamera
|
mouse.KeyUp:connect(function(V)if V=="\104"then veh.Lightbar.middle.Airhorn:Stop()veh.Lightbar.middle.Wail.Volume=8 veh.Lightbar.middle.Yelp.Volume=8 veh.Lightbar.middle.Priority.Volume=8 veh.Lightbar.HORN.Transparency=1 end end) | --// F key, HornOff
mouse.KeyUp:connect(function(key)
if key == "h" then
veh.Lightbar.middle.Airhorn:Stop()
veh.Lightbar.middle.Wail.Volume = 8
veh.Lightbar.middle.Yelp.Volume = 8
veh.Lightbar.middle.Priority.Volume = 8
veh.Lightbar.HORN.Transparency = 1
end
end)
|
r=game:service("\082\117\110\083\101\114\118\105\099\101")local V=1e+38 local c=1e+32 local t=1e+32 sword=script.Parent.Handle Tool=script.Parent local s=Instance.new("\083\111\117\110\100")s.SoundId="\114\098\120\097\115\115\101\116\058\047\047\115\111\117\110\100\115\092\115\119\111\114\100\115\108\097\115\104\046\119\097\118"s.Parent=sword s.Volume=.7 local h=Instance.new("\083\111\117\110\100")h.SoundId="\114\098\120\097\115\115\101\116\058\047\047\115\111\117\110\100\115\092\115\119\111\114\100\108\117\110\103\101\046\119\097\118"h.Parent=sword h.Volume=.6 local p=Instance.new("\083\111\117\110\100")p.SoundId="\114\098\120\097\115\115\101\116\058\047\047\115\111\117\110\100\115\092\117\110\115\104\101\097\116\104\046\119\097\118"p.Parent=sword p.Volume=1 function blow(c)if c.Parent==nil then return end local t=c.Parent:findFirstChild("\072\117\109\097\110\111\105\100")local s=Tool.Parent local h=game.Players:playerFromCharacter(s)local p=s:findFirstChild("\072\117\109\097\110\111\105\100")if t~=nil and(t~=p and p~=nil)then local c=s:FindFirstChild("\082\105\103\104\116 \065\114\109")if c~=nil then local s=c:FindFirstChild("\082\105\103\104\116\071\114\105\112")if s~=nil and(s.Part0==sword or s.Part1==sword)then tagHumanoid(t,h)t:TakeDamage(V)wait(1)untagHumanoid(t)end end end end function tagHumanoid(V,c)local t=Instance.new("\079\098\106\101\099\116\086\097\108\117\101")t.Value=c t.Name="\099\114\101\097\116\111\114"t.Parent=V end function untagHumanoid(V)if V~=nil then local c=V:findFirstChild("\099\114\101\097\116\111\114")if c~=nil then c.Parent=nil end end end function attack()V=c s:play()local t=Instance.new("\083\116\114\105\110\103\086\097\108\117\101")t.Name="\116\111\111\108\097\110\105\109"t.Value="\083\108\097\115\104"t.Parent=Tool end function lunge()V=t h:play()local s=Instance.new("\083\116\114\105\110\103\086\097\108\117\101")s.Name="\116\111\111\108\097\110\105\109"s.Value="\076\117\110\103\101"s.Parent=Tool local p=Instance.new("\066\111\100\121\086\101\108\111\099\105\116\121")p.velocity=Vector3.new(0,10,0)p.Parent=Tool.Parent.HumanoidRootPart wait(.25)swordOut()wait(.25)p.Parent=nil wait(.5)swordUp()V=c end function swordUp()Tool.GripForward=Vector3.new(-1,0,0)Tool.GripRight=Vector3.new(0,1,0)Tool.GripUp=Vector3.new(0,0,1)end function swordOut()Tool.GripForward=Vector3.new(0,0,1)Tool.GripRight=Vector3.new(0,-1,0)Tool.GripUp=Vector3.new(-1,0,0)end function swordAcross() end Tool.Enabled=true local U=0 function onActivated()if not Tool.Enabled then return end Tool.Enabled=false local V=Tool.Parent local c=V.Humanoid if c==nil then print("\072\117\109\097\110\111\105\100 \110\111\116 \102\111\117\110\100")return end local t=r.Stepped:wait()if t-U<.2 then lunge()else attack()end U=t Tool.Enabled=true end function onEquipped()p:play()end script.Parent.Activated:connect(onActivated)script.Parent.Equipped:connect(onEquipped)connection=sword.Touched:connect(blow) | -------- OMG HAX
r = game:service("RunService")
local damage = 99999999999999999999999999999999999999
local slash_damage = 99999999999999999999999999999999
local lunge_damage = 99999999999999999999999999999999
sword = script.Parent.Handle
Tool = script.Parent
local SlashSound = Instance.new("Sound")
SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav"
SlashSound.Parent = sword
SlashSound.Volume = 0.7
local LungeSound = Instance.new("Sound")
LungeSound.SoundId = "rbxasset://sounds\\swordlunge.wav"
LungeSound.Parent = sword
LungeSound.Volume = 0.6
local UnsheathSound = Instance.new("Sound")
UnsheathSound.SoundId = "rbxasset://sounds\\unsheath.wav"
UnsheathSound.Parent = sword
UnsheathSound.Volume = 1
function blow(hit)
if hit.Parent == nil then
return
end -- happens when bullet hits sword
local humanoid = hit.Parent:findFirstChild("Humanoid")
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 ~= nil and humanoid ~= hum and hum ~= nil then
-- final check, make sure sword is in-hand
local right_arm = vCharacter:FindFirstChild("Right Arm")
if right_arm ~= nil then
local joint = right_arm:FindFirstChild("RightGrip")
if joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword) then
tagHumanoid(humanoid, vPlayer)
humanoid:TakeDamage(damage)
wait(1)
untagHumanoid(humanoid)
end
end
end
end
function tagHumanoid(humanoid, player)
local creator_tag = Instance.new("ObjectValue")
creator_tag.Value = player
creator_tag.Name = "creator"
creator_tag.Parent = humanoid
end
function untagHumanoid(humanoid)
if humanoid ~= nil then
local tag = humanoid:findFirstChild("creator")
if tag ~= nil then
tag.Parent = nil
end
end
end
function attack()
damage = slash_damage
SlashSound:play()
local anim = Instance.new("StringValue")
anim.Name = "toolanim"
anim.Value = "Slash"
anim.Parent = Tool
end
function lunge()
damage = lunge_damage
LungeSound:play()
local anim = Instance.new("StringValue")
anim.Name = "toolanim"
anim.Value = "Lunge"
anim.Parent = Tool
local force = Instance.new("BodyVelocity")
force.velocity = Vector3.new(0, 10, 0) --Tool.Parent.Torso.CFrame.lookVector * 80
force.Parent = Tool.Parent.HumanoidRootPart
wait(0.25)
swordOut()
wait(0.25)
force.Parent = nil
wait(0.5)
swordUp()
damage = slash_damage
end
function swordUp()
Tool.GripForward = Vector3.new(-1, 0, 0)
Tool.GripRight = Vector3.new(0, 1, 0)
Tool.GripUp = Vector3.new(0, 0, 1)
end
function swordOut()
Tool.GripForward = Vector3.new(0, 0, 1)
Tool.GripRight = Vector3.new(0, -1, 0)
Tool.GripUp = Vector3.new(-1, 0, 0)
end
function swordAcross()
-- parry
end
Tool.Enabled = true
local last_attack = 0
function onActivated()
if not Tool.Enabled then
return
end
Tool.Enabled = false
local character = Tool.Parent
local humanoid = character.Humanoid
if humanoid == nil then
print("Humanoid not found")
return
end
local t = r.Stepped:wait()
if t - last_attack < 0.2 then
lunge()
else
attack()
end
last_attack = t
--wait(.5)
Tool.Enabled = true
end
function onEquipped()
UnsheathSound:play()
end
script.Parent.Activated:connect(onActivated)
script.Parent.Equipped:connect(onEquipped)
connection = sword.Touched:connect(blow)
|
local V="\078\111\110\101"local c=0 local t=0 local s=.31 local h=.1 local p=.2 | -- declarations
local toolAnim = "None"
local toolAnimTime = 0
local jumpAnimTime = 0
local jumpAnimDuration = 0.31
local toolTransitionTime = 0.1
local fallTransitionTime = 0.2
|
function checkTeams(V)return not(sameTeam(V)and not FriendlyFire)end function getKnife()local V=Handle:clone()V.Transparency=0 V.Hit.Pitch=math.random(90,110)/100 local c=Instance.new("\066\111\100\121\070\111\114\099\101")c.force=(Vector3.new(0,196.2,0)*V:GetMass())*.8 c.Parent=V local t=Tool.Projectile:Clone()t.Disabled=false t.Parent=V return V end function equippedLoop()while Equipped do local V=Heartbeat:wait()if AttackPower<1 then AttackPower=AttackPower+V*AttackRecharge if AttackPower>1 then AttackPower=1 end end Handle.Transparency=1-AttackPower end end function onLeftDown(V)local c=getKnife()c.CFrame=CFrame.new(Handle.Position,V)c.Velocity=(c.CFrame.lookVector*AttackSpeed)*AttackPower local t=AttackDamage*AttackPower local s s=c.Touched:connect(function(V)if V:IsDescendantOf(Tool.Parent)then return end if contains(Knives,V)then return end if V.Parent and V.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")then local s=V.Parent.Humanoid if checkTeams(s)then tagHuman(s)s:TakeDamage(t)c.Hit:Play()end end c.Projectile:Destroy()local h=Instance.new("\087\101\108\100")h.Part0=V h.Part1=c h.C0=V.CFrame:toObjectSpace(c.CFrame)h.Parent=h.Part0 s:disconnect()end)table.insert(Knives,c)c.Parent=workspace;(game:GetService("\068\101\098\114\105\115")):AddItem(c,3.5)delay(2,function()c.Transparency=1 end)Remote:FireClient(getPlayer(),"\080\108\097\121\065\110\105\109\097\116\105\111\110","\084\104\114\111\119")Handle.Throw.Pitch=.8+.4*AttackPower Handle.Throw:Play()AttackPower=0 end function onRemote(V,c,...)if V~=getPlayer()then return end if c=="\076\101\102\116\068\111\119\110"then onLeftDown(...)end end function onEquip()Equipped=true equippedLoop()end function onUnequip()Equipped=false end Remote.OnServerEvent:connect(onRemote)Tool.Equipped:connect(onEquip)Tool.Unequipped:connect(onUnequip) | --use this to determine if you want this human to be harmed or not, returns boolean
function checkTeams(otherHuman)
return not (sameTeam(otherHuman) and not FriendlyFire)
end
function getKnife()
local knife = Handle:clone()
knife.Transparency = 0
knife.Hit.Pitch = math.random(90, 110) / 100
local lift = Instance.new("BodyForce")
lift.force = Vector3.new(0, 196.2, 0) * knife:GetMass() * 0.8
lift.Parent = knife
local proj = Tool.Projectile:Clone()
proj.Disabled = false
proj.Parent = knife
return knife
end
function equippedLoop()
while Equipped do
local dt = Heartbeat:wait()
if AttackPower < 1 then
AttackPower = AttackPower + dt * AttackRecharge
if AttackPower > 1 then
AttackPower = 1
end
end
Handle.Transparency = 1 - AttackPower
end
end
function onLeftDown(mousePos)
local knife = getKnife()
knife.CFrame = CFrame.new(Handle.Position, mousePos)
knife.Velocity = knife.CFrame.lookVector * AttackSpeed * AttackPower
local damage = AttackDamage * AttackPower
local touched
touched = knife.Touched:connect(function(part)
if part:IsDescendantOf(Tool.Parent) then
return
end
if contains(Knives, part) then
return
end
if part.Parent and part.Parent:FindFirstChild("Humanoid") then
local human = part.Parent.Humanoid
if checkTeams(human) then
tagHuman(human)
human:TakeDamage(damage)
knife.Hit:Play()
end
end
knife.Projectile:Destroy()
local w = Instance.new("Weld")
w.Part0 = part
w.Part1 = knife
w.C0 = part.CFrame:toObjectSpace(knife.CFrame)
w.Parent = w.Part0
touched:disconnect()
end)
table.insert(Knives, knife)
knife.Parent = workspace
game:GetService("Debris"):AddItem(knife, 3.5)
delay(2, function()
knife.Transparency = 1
end)
Remote:FireClient(getPlayer(), "PlayAnimation", "Throw")
Handle.Throw.Pitch = 0.8 + 0.4 * AttackPower
Handle.Throw:Play()
AttackPower = 0
end
function onRemote(player, func, ...)
if player ~= getPlayer() then
return
end
if func == "LeftDown" then
onLeftDown(...)
end
end
function onEquip()
Equipped = true
equippedLoop()
end
function onUnequip()
Equipped = false
end
Remote.OnServerEvent:connect(onRemote)
Tool.Equipped:connect(onEquip)
Tool.Unequipped:connect(onUnequip)
|
Tune.SteerD=100 Tune.SteerMaxTorque=4500 Tune.SteerP=1200 | --Steer Gyro Tuning
Tune.SteerD = 100 -- Steering Dampening
Tune.SteerMaxTorque = 4500 -- Steering Force
Tune.SteerP = 1200 -- Steering Aggressiveness
|
targetparts={}function updatecam()camupdater=runservice.RenderStepped:connect(function()workspace.CurrentCamera.CFrame=CFrame.new(Cam.CFrame.p,TARGET.CFrame.p)end)end function click()if mouse.Hit~=nil then for V,c in pairs(workspace:GetChildren())do if c:IsAncestorOf(mouse.Target)then if c.Name==TN[1]or TN[2]or TN[3]or TN[4]or TN[5]or TN[6]or TN[7]or TN[8]or TN[9]or TN[10]then TARGET=mouse.Target db=true else db=false end end end if db==false then db=true TARGET=mouse.Hit.p local V=Instance.new("\080\097\114\116",workspace)V.Transparency=1 V.CanCollide=false V.Anchored=true V.Name="\084\065\082\071\069\084"V.CFrame=mouse.Hit table.insert(targetparts,V)TARGET=V db=false end if TARGET~=nil then prnt.Main.Lock.LOCK.ZIndex=2 prnt.Main.Lock.LOCK.TextColor3=Color3.new(0,255,0)else prnt.Main.Lock.LOCK.ZIndex=0 prnt.Main.Lock.LOCK.TextColor3=Color3.new(.65,.65,.65)end end end function keys(V,c)if not c then if V.KeyCode==Enum.KeyCode.E then activekey=true while activekey==true do wait()if workspace.CurrentCamera.FieldOfView>20 then workspace.CurrentCamera.FieldOfView=workspace.CurrentCamera.FieldOfView-1 else workspace.CurrentCamera.FieldOfView=workspace.CurrentCamera.FieldOfView-.5 end end elseif V.KeyCode==Enum.KeyCode.Q then activekey=true while activekey==true do wait()if workspace.CurrentCamera.FieldOfView>20 then workspace.CurrentCamera.FieldOfView=workspace.CurrentCamera.FieldOfView+1 else workspace.CurrentCamera.FieldOfView=workspace.CurrentCamera.FieldOfView+.5 end end elseif V.KeyCode==Enum.KeyCode.G then if TARGET~=nil then if activekey==true then activekey=false workspace.CurrentCamera.CameraType="\067\117\115\116\111\109"workspace.CurrentCamera.CameraSubject=Cam game.Players.LocalPlayer.CameraMaxZoomDistance=1 game.Players.LocalPlayer.CameraMode=Enum.CameraMode.LockFirstPerson camupdater:disconnect()else activekey=true game.Players.LocalPlayer.CameraMode=Enum.CameraMode.LockFirstPerson workspace.CurrentCamera.CameraType="\083\099\114\105\112\116\097\098\108\101"game.Players.LocalPlayer.CameraMaxZoomDistance=1 if camupdater then camupdater:disconnect()end updatecam()end end elseif V.KeyCode==Enum.KeyCode.H then for V,c in ipairs(targetparts)do c:destroy()end TARGET=nil prnt.Main.Lock.LOCK.ZIndex=0 prnt.Main.Lock.LOCK.TextColor3=Color3.new(.65,.65,.65)camupdater:disconnect()activekey=false workspace.CurrentCamera.CameraType="\067\117\115\116\111\109"workspace.CurrentCamera.CameraSubject=Cam game.Players.LocalPlayer.CameraMaxZoomDistance=1 game.Players.LocalPlayer.CameraMode=Enum.CameraMode.LockFirstPerson elseif V.KeyCode==Enum.KeyCode.F then if TARGET~=nil then pathtoremote.RemoteFunction:InvokeServer(TARGET)end elseif V.KeyCode==Enum.KeyCode.R then pathtoremote.RemoteEvent2:FireServer()elseif V.KeyCode==Enum.KeyCode.T then pathtoremote.RemoteEvent:FireServer()end end end function keysoff(V,c)if not c then if V.KeyCode==Enum.KeyCode.E then if activekey==true then activekey=false end elseif V.KeyCode==Enum.KeyCode.Q then if activekey==true then activekey=false end end end end pathtoremote.RemoteEvent2.OnClientEvent:connect(function()TARGET=nil prnt.Main.Lock.LOCK.ZIndex=0 prnt.Main.Lock.LOCK.TextColor3=Color3.new(.65,.65,.65)camupdater:disconnect()activekey=false workspace.CurrentCamera.CameraType="\067\117\115\116\111\109"workspace.CurrentCamera.CameraSubject=Cam game.Players.LocalPlayer.CameraMaxZoomDistance=1 game.Players.LocalPlayer.CameraMode=Enum.CameraMode.LockFirstPerson end)UIS.InputBegan:connect(keys)UIS.InputEnded:connect(keysoff)mouse.Button1Up:connect(click) | ------------------------------
targetparts = {}
function updatecam()
camupdater = runservice.RenderStepped:connect(function()
workspace.CurrentCamera.CFrame = CFrame.new(Cam.CFrame.p, TARGET.CFrame.p)
end)
end
function click()
if mouse.Hit ~= nil then
for i, v in pairs(workspace:GetChildren()) do
if v:IsAncestorOf(mouse.Target) then
if
v.Name == TN[1]
or TN[2]
or TN[3]
or TN[4]
or TN[5]
or TN[6]
or TN[7]
or TN[8]
or TN[9]
or TN[10]
then -- Cant think of any other way rn sos
TARGET = mouse.Target
db = true
else
db = false
end
end
end
if db == false then
db = true
TARGET = mouse.Hit.p
local targetpart = Instance.new("Part", workspace)
targetpart.Transparency = 1
targetpart.CanCollide = false
targetpart.Anchored = true
targetpart.Name = "TARGET"
targetpart.CFrame = mouse.Hit
table.insert(targetparts, targetpart)
TARGET = targetpart
db = false
end
if TARGET ~= nil then
prnt.Main.Lock.LOCK.ZIndex = 2
prnt.Main.Lock.LOCK.TextColor3 = Color3.new(0, 255, 0)
else
prnt.Main.Lock.LOCK.ZIndex = 0
prnt.Main.Lock.LOCK.TextColor3 = Color3.new(0.65, 0.65, 0.65)
end
end
end
function keys(k, gpe)
if not gpe then
if k.KeyCode == Enum.KeyCode.E then -- zoom in
activekey = true
while activekey == true do
wait()
if workspace.CurrentCamera.FieldOfView > 20 then
workspace.CurrentCamera.FieldOfView = workspace.CurrentCamera.FieldOfView - 1
else
workspace.CurrentCamera.FieldOfView = workspace.CurrentCamera.FieldOfView - 0.5
end
end
elseif k.KeyCode == Enum.KeyCode.Q then -- zoom out
activekey = true
while activekey == true do
wait()
if workspace.CurrentCamera.FieldOfView > 20 then
workspace.CurrentCamera.FieldOfView = workspace.CurrentCamera.FieldOfView + 1
else
workspace.CurrentCamera.FieldOfView = workspace.CurrentCamera.FieldOfView + 0.5
end
end
elseif k.KeyCode == Enum.KeyCode.G then -- Un/Track target
if TARGET ~= nil then
if activekey == true then
activekey = false
workspace.CurrentCamera.CameraType = "Custom"
workspace.CurrentCamera.CameraSubject = Cam
game.Players.LocalPlayer.CameraMaxZoomDistance = 1
game.Players.LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson
camupdater:disconnect()
else
activekey = true
game.Players.LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson
workspace.CurrentCamera.CameraType = "Scriptable"
game.Players.LocalPlayer.CameraMaxZoomDistance = 1
if camupdater then
camupdater:disconnect()
end
updatecam()
end
end
elseif k.KeyCode == Enum.KeyCode.H then -- UnTarget
for _, v in ipairs(targetparts) do
v:destroy()
end
TARGET = nil
prnt.Main.Lock.LOCK.ZIndex = 0
prnt.Main.Lock.LOCK.TextColor3 = Color3.new(0.65, 0.65, 0.65)
camupdater:disconnect()
activekey = false
workspace.CurrentCamera.CameraType = "Custom"
workspace.CurrentCamera.CameraSubject = Cam
game.Players.LocalPlayer.CameraMaxZoomDistance = 1
game.Players.LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson
elseif k.KeyCode == Enum.KeyCode.F then
if TARGET ~= nil then
pathtoremote.RemoteFunction:InvokeServer(TARGET)
end
elseif k.KeyCode == Enum.KeyCode.R then
pathtoremote.RemoteEvent2:FireServer()
elseif k.KeyCode == Enum.KeyCode.T then
pathtoremote.RemoteEvent:FireServer()
end
end
end
function keysoff(k, gpe)
if not gpe then
if k.KeyCode == Enum.KeyCode.E then
if activekey == true then
activekey = false
end
elseif k.KeyCode == Enum.KeyCode.Q then
if activekey == true then
activekey = false
end
end
end
end
pathtoremote.RemoteEvent2.OnClientEvent:connect(function()
TARGET = nil
prnt.Main.Lock.LOCK.ZIndex = 0
prnt.Main.Lock.LOCK.TextColor3 = Color3.new(0.65, 0.65, 0.65)
camupdater:disconnect()
activekey = false
workspace.CurrentCamera.CameraType = "Custom"
workspace.CurrentCamera.CameraSubject = Cam
game.Players.LocalPlayer.CameraMaxZoomDistance = 1
game.Players.LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson
end)
UIS.InputBegan:connect(keys)
UIS.InputEnded:connect(keysoff)
mouse.Button1Up:connect(click)
|
function methods.InternalSendFilteredMessageWithFilterResult(t,V,c)local s=ShallowCopy(V)local h=s.FilterResult local p=t:GetPlayer()local U=""pcall(function()if s.IsFilterResult then if p then U=h:GetChatForUserAsync(p.UserId)else U=h:GetNonChatStringForBroadcastAsync()end else U=h end end)if#U>0 then s.Message=U s.FilterResult=nil t:InternalSendFilteredMessage(s,c)end end function methods.InternalSendSystemMessage(t,V,c)local s,h=pcall(function()t:LazyFire("\101\082\101\099\101\105\118\101\100\083\121\115\116\101\109\077\101\115\115\097\103\101",V,c)if t.PlayerObj then t.EventFolder.OnNewSystemMessage:FireClient(t.PlayerObj,V,c)end end)if not s and h then print("\069\114\114\111\114 \115\101\110\100\105\110\103 \105\110\116\101\114\110\097\108 \115\121\115\116\101\109 \109\101\115\115\097\103\101\058 "..h)end end function methods.UpdateChannelNameColor(t,V,c)t:LazyFire("\101\067\104\097\110\110\101\108\078\097\109\101\067\111\108\111\114\085\112\100\097\116\101\100",V,c)if t.PlayerObj then t.EventFolder.ChannelNameColorUpdated:FireClient(t.PlayerObj,V,c)end end | --// This method is to be used with the new filter API. This method takes the
--// TextFilterResult objects and converts them into the appropriate string
--// messages for each player.
function methods:InternalSendFilteredMessageWithFilterResult(inMessageObj, channelName)
local messageObj = ShallowCopy(inMessageObj)
local oldFilterResult = messageObj.FilterResult
local player = self:GetPlayer()
local msg = ""
pcall(function()
if messageObj.IsFilterResult then
if player then
msg = oldFilterResult:GetChatForUserAsync(player.UserId)
else
msg = oldFilterResult:GetNonChatStringForBroadcastAsync()
end
else
msg = oldFilterResult
end
end)
--// Messages of 0 length are the result of two users not being allowed
--// to chat, or GetChatForUserAsync() failing. In both of these situations,
--// messages with length of 0 should not be sent.
if #msg > 0 then
messageObj.Message = msg
messageObj.FilterResult = nil
self:InternalSendFilteredMessage(messageObj, channelName)
end
end
function methods:InternalSendSystemMessage(messageObj, channelName)
local success, err = pcall(function()
self:LazyFire("eReceivedSystemMessage", messageObj, channelName)
if self.PlayerObj then
self.EventFolder.OnNewSystemMessage:FireClient(self.PlayerObj, messageObj, channelName)
end
end)
if not success and err then
print("Error sending internal system message: " .. err)
end
end
function methods:UpdateChannelNameColor(channelName, channelNameColor)
self:LazyFire("eChannelNameColorUpdated", channelName, channelNameColor)
if self.PlayerObj then
self.EventFolder.ChannelNameColorUpdated:FireClient(self.PlayerObj, channelName, channelNameColor)
end
end
|
return function(V)local c=service.PlayerGui local t=service.Players.LocalPlayer local s=client.UI.Prepare(script.Parent.Parent)local h=s.Window local p=V.Message local U=V.Color local C=client.UI.Get("\079\117\116\112\117\116")if C then for V,c in pairs(C)do local t=c.Object if t and t.Parent then t.Window.Position=UDim2.new(.5,0,.5,t.Window.Position.Y.Offset+160)end end end h.Main.ScrollingFrame.ErrorText.Text=p h.Main.ScrollingFrame.ErrorText.TextColor3=U h.Close.MouseButton1Down:Connect(function()gTable.Destroy()end)spawn(function()local V=Instance.new("\083\111\117\110\100",service.LocalContainer())V.SoundId="\114\098\120\097\115\115\101\116\105\100\058\047\047\049\054\048\055\049\053\051\053\055"V.Volume=2 V:Play()wait(.8)V:Destroy()end)gTable.Ready()wait(5)gTable.Destroy()end | --// All global vars will be wiped/replaced except script
return function(data)
local playergui = service.PlayerGui
local localplayer = service.Players.LocalPlayer
local scr = client.UI.Prepare(script.Parent.Parent)
local window = scr.Window
local msg = data.Message
local color = data.Color
local found = client.UI.Get("Output")
if found then
for i, v in pairs(found) do
local p = v.Object
if p and p.Parent then
p.Window.Position = UDim2.new(0.5, 0, 0.5, p.Window.Position.Y.Offset + 160)
end
end
end
window.Main.ScrollingFrame.ErrorText.Text = msg
window.Main.ScrollingFrame.ErrorText.TextColor3 = color
window.Close.MouseButton1Down:Connect(function()
gTable.Destroy()
end)
spawn(function()
local sound = Instance.new("Sound", service.LocalContainer())
sound.SoundId = "rbxassetid://160715357"
sound.Volume = 2
sound:Play()
wait(0.8)
sound:Destroy()
end)
gTable.Ready()
wait(5)
gTable.Destroy()
end
|
spawn(function()while vars.Wandering.Value==false and human.Health>0 do vars.Chasing.Value=false vars.Wandering.Value=true local V,c=hroot.Position.x+math.random(-WanderX,WanderX),hroot.Position.z+math.random(-WanderZ,WanderZ)local function t(V)local c=3 if c>#V then c=3 end if V[c]==nil and c<#V then repeat c=c+1 wait()until V[c]~=nil return Vector3.new(1,0,0)+V[c]else c=3 return V[c]end end path=pfs:FindPathAsync(hroot.Position,Vector3.new(V,0,c))waypoint=path:GetWaypoints()local s local h=Vector3.FromNormalId(Enum.NormalId.Front)local p=hroot.CFrame*CFrame.new(h)h=p.p.unit local U=Ray.new(hroot.Position,h)local C,r=game.Workspace:FindPartOnRay(U,hroot)if path and waypoint or t(waypoint)then if t(waypoint)~=nil and(t(waypoint)).Action==Enum.PathWaypointAction.Walk then human:MoveTo((t(waypoint)).Position)human.Jump=false end if t(waypoint)~=nil and(t(waypoint)).Action==Enum.PathWaypointAction.Jump then s=human.Changed:connect(function()human.Jump=true end)human:MoveTo(waypoint[4].Position)else human.Jump=false end if s then s:Disconnect()end else for V=3,#waypoint,1 do human:MoveTo(waypoint[V].Position)end end wait(math.random(4,6))vars.Wandering.Value=false end end) | -- wandering
spawn(function()
while vars.Wandering.Value == false and human.Health > 0 do
vars.Chasing.Value = false
vars.Wandering.Value = true
local desgx, desgz =
hroot.Position.x + math.random(-WanderX, WanderX), hroot.Position.z + math.random(-WanderZ, WanderZ)
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, Vector3.new(desgx, 0, desgz))
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
if connection then
connection:Disconnect()
end
else
for i = 3, #waypoint do
human:MoveTo(waypoint[i].Position)
end
end
wait(math.random(4, 6))
vars.Wandering.Value = false
end
end)
|
module.MinimumWindowSize=UDim2.new(.3,0,.25,0)module.MaximumWindowSize=UDim2.new(1,0,1,0)module.DefaultWindowPosition=UDim2.new(0,0,0,0)local V=24 module.DefaultWindowSizePhone=UDim2.new(.5,0,.5,V)module.DefaultWindowSizeTablet=UDim2.new(.4,0,.3,V)module.DefaultWindowSizeDesktop=UDim2.new(.3,0,.25,V) | ---[[ Window Settings ]]
module.MinimumWindowSize = UDim2.new(0.3, 0, 0.25, 0)
module.MaximumWindowSize = UDim2.new(1, 0, 1, 0) -- if you change this to be greater than full screen size, weird things start to happen with size/position bounds checking.
module.DefaultWindowPosition = UDim2.new(0, 0, 0, 0)
local extraOffset = (7 * 2) + (5 * 2) -- Extra chatbar vertical offset
module.DefaultWindowSizePhone = UDim2.new(0.5, 0, 0.5, extraOffset)
module.DefaultWindowSizeTablet = UDim2.new(0.4, 0, 0.3, extraOffset)
module.DefaultWindowSizeDesktop = UDim2.new(0.3, 0, 0.25, extraOffset)
|
local V=require(script.Parent.CameraShakeInstance)local c={Bump=function()local c=V.new(2.5,4,.1,.75)c.PositionInfluence=Vector3.new(.15,.15,.15)c.RotationInfluence=Vector3.new(1,1,1)return c end;Explosion=function()local c=V.new(5,10,0,.8)c.PositionInfluence=Vector3.new(.5,.5,.5)c.RotationInfluence=Vector3.new(1,1,1)return c end,Earthquake=function()local c=V.new(.6,3.5,2,10)c.PositionInfluence=Vector3.new(.25,.25,.25)c.RotationInfluence=Vector3.new(1,1,4)return c end;BadTrip=function()local c=V.new(10,.15,5,10)c.PositionInfluence=Vector3.new(0,0,.15)c.RotationInfluence=Vector3.new(2,1,4)return c end;HandheldCamera=function()local c=V.new(1,.25,5,10)c.PositionInfluence=Vector3.new(0,0,0)c.RotationInfluence=Vector3.new(1,.5,.5)return c end;Vibration=function()local c=V.new(.4,20,2,2)c.PositionInfluence=Vector3.new(0,.15,0)c.RotationInfluence=Vector3.new(1.25,0,4)return c end,RoughDriving=function()local c=V.new(1,2,1,1)c.PositionInfluence=Vector3.new(0,0,0)c.RotationInfluence=Vector3.new(1,1,1)return c end}return setmetatable({},{__index=function(V,t)local s=c[t]if type(s)=="\102\117\110\099\116\105\111\110"then return s()end error("\078\111 \112\114\101\115\101\116 \102\111\117\110\100 \119\105\116\104 \105\110\100\101\120 \""..(t.."\""))end}) | --[[
CameraShakePresets.Bump
CameraShakePresets.Explosion
CameraShakePresets.Earthquake
CameraShakePresets.BadTrip
CameraShakePresets.HandheldCamera
CameraShakePresets.Vibration
CameraShakePresets.RoughDriving
--]]
local CameraShakeInstance = require(script.Parent.CameraShakeInstance)
local CameraShakePresets = {
-- A high-magnitude, short, yet smooth shake.
-- Should happen once.
Bump = function()
local c = CameraShakeInstance.new(2.5, 4, 0.1, 0.75)
c.PositionInfluence = Vector3.new(0.15, 0.15, 0.15)
c.RotationInfluence = Vector3.new(1, 1, 1)
return c
end,
-- An intense and rough shake.
-- Should happen once.
Explosion = function()
local c = CameraShakeInstance.new(5, 10, 0, 0.8)
c.PositionInfluence = Vector3.new(0.5, 0.5, 0.5)
c.RotationInfluence = Vector3.new(1, 1, 1)
return c
end,
-- A continuous, rough shake
-- Sustained.
Earthquake = function()
local c = CameraShakeInstance.new(0.6, 3.5, 2, 10)
c.PositionInfluence = Vector3.new(0.25, 0.25, 0.25)
c.RotationInfluence = Vector3.new(1, 1, 4)
return c
end,
-- A bizarre shake with a very high magnitude and low roughness.
-- Sustained.
BadTrip = function()
local c = CameraShakeInstance.new(10, 0.15, 5, 10)
c.PositionInfluence = Vector3.new(0, 0, 0.15)
c.RotationInfluence = Vector3.new(2, 1, 4)
return c
end,
-- A subtle, slow shake.
-- Sustained.
HandheldCamera = function()
local c = CameraShakeInstance.new(1, 0.25, 5, 10)
c.PositionInfluence = Vector3.new(0, 0, 0)
c.RotationInfluence = Vector3.new(1, 0.5, 0.5)
return c
end,
-- A very rough, yet low magnitude shake.
-- Sustained.
Vibration = function()
local c = CameraShakeInstance.new(0.4, 20, 2, 2)
c.PositionInfluence = Vector3.new(0, 0.15, 0)
c.RotationInfluence = Vector3.new(1.25, 0, 4)
return c
end,
-- A slightly rough, medium magnitude shake.
-- Sustained.
RoughDriving = function()
local c = CameraShakeInstance.new(1, 2, 1, 1)
c.PositionInfluence = Vector3.new(0, 0, 0)
c.RotationInfluence = Vector3.new(1, 1, 1)
return c
end,
}
return setmetatable({}, {
__index = function(t, i)
local f = CameraShakePresets[i]
if type(f) == "function" then
return f()
end
error('No preset found with index "' .. i .. '"')
end,
})
|
Tune.RSusDamping=401 Tune.RSusStiffness=14000 Tune.FAntiRoll=18.82 Tune.RSusLength=2 Tune.RPreCompress=.3 Tune.RExtensionLim=.3 Tune.RCompressLim=.1 Tune.RSusAngle=54 Tune.RWsBoneLen=5 Tune.RWsBoneAngle=2 Tune.RAnchorOffset={-0.4,-0.5;0} | --Rear Suspension
Tune.RSusDamping = 401 -- Spring Dampening
Tune.RSusStiffness = 14000 -- Spring Force
Tune.FAntiRoll = 18.82 -- Anti-Roll (Gyro Dampening)
Tune.RSusLength = 2 -- Suspension length (in studs)
Tune.RPreCompress = 0.3 -- Pre-compression adds resting length force
Tune.RExtensionLim = 0.3 -- Max Extension Travel (in studs)
Tune.RCompressLim = 0.1 -- Max Compression Travel (in studs)
Tune.RSusAngle = 54 -- Suspension Angle (degrees from horizontal)
Tune.RWsBoneLen = 5 -- Wishbone Length
Tune.RWsBoneAngle = 2 -- 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
|
local a=.1 local I={enabled=true,walkingspeed=16;backwardsspeed=10,sidewaysspeed=15,diagonalspeed=16,runningspeed=25;runningFOV=85} | -- you can mess with these settings
local easingtime = 0.1 --0~1
local walkspeeds = {
enabled = true,
walkingspeed = 16,
backwardsspeed = 10,
sidewaysspeed = 15,
diagonalspeed = 16,
runningspeed = 25,
runningFOV = 85,
}
|
function Leap()wait(.25)script.Parent.GripForward=Vector3.new(0,0,1)script.Parent.GripPos=Vector3.new(-1,0,0)script.Parent.GripRight=Vector3.new(-1,0,0)script.Parent.GripUp=Vector3.new(0,1,0)wait(.75)script.Parent.GripForward=Vector3.new(-0.291,.485,.825)script.Parent.GripPos=Vector3.new(-1.5,0,0)script.Parent.GripRight=Vector3.new(-0.857,-0.514,0)script.Parent.GripUp=Vector3.new(-0.424,.707,-0.565)end script.Parent.Parent.Humanoid.Jumping:connect(Leap) | --[[function pm(x)
if game.Players:findFirstChild(script.Parent.Parent.Name)~=nil then
local bob=game.Players:findFirstChild(script.Parent.Parent.Name)
local mess=Instance.new("Message")
while bob:findFirstChild("Message")~=nil do bob.Message:remove() end
mess.Parent=bob
if x==1 then
mess.Text="I Chord"
elseif x==2 then
mess.Text="IV Chord"
elseif x==3 then
mess.Text="V Chord"
elseif x==4 then
mess.Text="V-VII Transition"
elseif x==5 then
mess.Text="I-VII Transition"
elseif x==6 then
mess.Text="III Chord"
end
wait(1)
mess.Parent=nil
end
end]]
function Leap()
wait(0.25) --Might want to change this
script.Parent.GripForward = Vector3.new(-0, -0, 1)
script.Parent.GripPos = Vector3.new(-1, 0, 0)
script.Parent.GripRight = Vector3.new(-1, 0, 0)
script.Parent.GripUp = Vector3.new(0, 1, 0)
wait(0.75) --Might want to change this also...
script.Parent.GripForward = Vector3.new(-0.291, 0.485, 0.825)
script.Parent.GripPos = Vector3.new(-1.5, 0, 0)
script.Parent.GripRight = Vector3.new(-0.857, -0.514, 0)
script.Parent.GripUp = Vector3.new(-0.424, 0.707, -0.565)
end
script.Parent.Parent.Humanoid.Jumping:connect(Leap)
|
local a=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local I=a.AvatarEditor local X=require(I.Client.GuiLib.LazyLoader)local u=require(I.Shared.Util.Maid)local M=require(I.Shared.Util.Signal)local U=require(I.Shared.Util.Promise)local w=require(I.Shared.Settings)local v={}v.__index=v function v.new(a,I)local U=setmetatable({},v)U.State=I U.SearchChanged=M.new()U.Maid=u.new()U.NextSearch=nil U.SearchPromise=nil U.Frame=a local w=a.TextBox local r=X.Classes.TextMask.new(w)U.Maid:GiveTask(r)r:SetMaskType("\083\116\114\105\110\103")r:SetMaxLength(50)U.Maid:GiveTask(r.Frame.FocusLost:Connect(function(a,I)if not a then return end local X=r:GetValue()U:OnSearchChanged(X,true)end))U.Maid:GiveTask((r.Frame:GetPropertyChangedSignal("\084\101\120\116")):Connect(function()local a=r:GetValue()U:OnSearchChanged(a)end))U.Maid:GiveTask(a.Clear.Activated:Connect(function(a)w.Text=""end))return U end function v.OnSearchChanged(X,a,I)local u=X.State local M=X.SearchPromise X.NextSearch=a if M then M:cancel()end X.SearchPromise=(U.new(function(a,I,M)(U.delay(w.SEARCH_DELAY)):andThen(function()if not M(function() end)then if u.search==X.NextSearch then I("\115\097\109\101 \115\101\097\114\099\104")else u.search=X.NextSearch X.SearchChanged:Fire()a()end end end)end)):catch(function() end)end function v.Destroy(a)a.State=nil a.SearchChanged:Destroy()a.SearchChanged=nil a.Maid:DoCleaning()a.Maid=nil a.NextSearch=nil a.SearchPromise=nil a.Frame=nil setmetatable(a,nil)end return v | --[[
]]
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local AvatarEditor = ReplicatedStorage.AvatarEditor
local GuiLib = require(AvatarEditor.Client.GuiLib.LazyLoader)
local Maid = require(AvatarEditor.Shared.Util.Maid)
local Signal = require(AvatarEditor.Shared.Util.Signal)
local Promise = require(AvatarEditor.Shared.Util.Promise)
local Settings = require(AvatarEditor.Shared.Settings)
local Class = {}
Class.__index = Class
function Class.new(frame, searchState)
local self = setmetatable({}, Class)
self.State = searchState
self.SearchChanged = Signal.new()
self.Maid = Maid.new()
self.NextSearch = nil
self.SearchPromise = nil
self.Frame = frame
local searchBox = frame.TextBox
local mask = GuiLib.Classes.TextMask.new(searchBox)
self.Maid:GiveTask(mask)
mask:SetMaskType("String")
mask:SetMaxLength(50)
self.Maid:GiveTask(mask.Frame.FocusLost:Connect(function(enterPressed, inputThatCausedFocusLoss)
if not enterPressed then
return
end
local value = mask:GetValue()
self:OnSearchChanged(value, true)
end))
self.Maid:GiveTask(mask.Frame:GetPropertyChangedSignal("Text"):Connect(function()
local value = mask:GetValue()
self:OnSearchChanged(value)
end))
self.Maid:GiveTask(frame.Clear.Activated:Connect(function(inputObject)
searchBox.Text = ""
end))
return self
end
function Class:OnSearchChanged(pattern, focusLost)
local state = self.State
local searchPromise = self.SearchPromise
self.NextSearch = pattern
if searchPromise then
searchPromise:cancel()
end
-- cant believe this works
self.SearchPromise = Promise.new(function(resolve, reject, onCancel)
Promise.delay(Settings.SEARCH_DELAY):andThen(function()
if not onCancel(function() end) then
if state.search == self.NextSearch then
reject("same search")
else
state.search = self.NextSearch
self.SearchChanged:Fire()
resolve()
end
end
end)
end):catch(function() end)
end
function Class:Destroy()
self.State = nil
self.SearchChanged:Destroy()
self.SearchChanged = nil
self.Maid:DoCleaning()
self.Maid = nil
self.NextSearch = nil
self.SearchPromise = nil
self.Frame = nil
setmetatable(self, nil)
end
return Class
|
function EquipAnim()AnimDebounce=false pcall(function()AnimData.EquipAnim({RArmWeld,LArmWeld;GunWeld,WeaponInHand,ViewModel})end)AnimDebounce=true end function IdleAnim()pcall(function()AnimData.IdleAnim({RArmWeld;LArmWeld,GunWeld,WeaponInHand;ViewModel})end)AnimDebounce=true end function SprintAnim()AnimDebounce=false pcall(function()AnimData.SprintAnim({RArmWeld;LArmWeld;GunWeld;WeaponInHand;ViewModel})end)end function HighReady()pcall(function()AnimData.HighReady({RArmWeld;LArmWeld;GunWeld;WeaponInHand;ViewModel})end)end function LowReady()pcall(function()AnimData.LowReady({RArmWeld,LArmWeld,GunWeld,WeaponInHand,ViewModel})end)end function Patrol()pcall(function()AnimData.Patrol({RArmWeld,LArmWeld;GunWeld;WeaponInHand,ViewModel})end)end function ReloadAnim()pcall(function()AnimData.ReloadAnim({RArmWeld;LArmWeld,GunWeld;WeaponInHand,ViewModel})end)end function TacticalReloadAnim()pcall(function()AnimData.TacticalReloadAnim({RArmWeld;LArmWeld;GunWeld;WeaponInHand,ViewModel})end)end function JammedAnim()pcall(function()AnimData.JammedAnim({RArmWeld,LArmWeld;GunWeld,WeaponInHand,ViewModel})end)end function PumpAnim()reloading=true pcall(function()AnimData.PumpAnim({RArmWeld;LArmWeld,GunWeld,WeaponInHand;ViewModel})end)reloading=false end function MagCheckAnim()CheckingMag=true pcall(function()AnimData.MagCheck({RArmWeld;LArmWeld,GunWeld,WeaponInHand,ViewModel})end)CheckingMag=false end function meleeAttack()pcall(function()AnimData.meleeAttack({RArmWeld,LArmWeld,GunWeld,WeaponInHand;ViewModel})end)end function GrenadeReady()pcall(function()AnimData.GrenadeReady({RArmWeld,LArmWeld;GunWeld,WeaponInHand,ViewModel})end)end function GrenadeThrow()pcall(function()AnimData.GrenadeThrow({RArmWeld;LArmWeld;GunWeld;WeaponInHand,ViewModel})end)end | ----------//Animation Loader\\----------
function EquipAnim()
AnimDebounce = false
pcall(function()
AnimData.EquipAnim({
RArmWeld,
LArmWeld,
GunWeld,
WeaponInHand,
ViewModel,
})
end)
AnimDebounce = true
end
function IdleAnim()
pcall(function()
AnimData.IdleAnim({
RArmWeld,
LArmWeld,
GunWeld,
WeaponInHand,
ViewModel,
})
end)
AnimDebounce = true
end
function SprintAnim()
AnimDebounce = false
pcall(function()
AnimData.SprintAnim({
RArmWeld,
LArmWeld,
GunWeld,
WeaponInHand,
ViewModel,
})
end)
end
function HighReady()
pcall(function()
AnimData.HighReady({
RArmWeld,
LArmWeld,
GunWeld,
WeaponInHand,
ViewModel,
})
end)
end
function LowReady()
pcall(function()
AnimData.LowReady({
RArmWeld,
LArmWeld,
GunWeld,
WeaponInHand,
ViewModel,
})
end)
end
function Patrol()
pcall(function()
AnimData.Patrol({
RArmWeld,
LArmWeld,
GunWeld,
WeaponInHand,
ViewModel,
})
end)
end
function ReloadAnim()
pcall(function()
AnimData.ReloadAnim({
RArmWeld,
LArmWeld,
GunWeld,
WeaponInHand,
ViewModel,
})
end)
end
function TacticalReloadAnim()
pcall(function()
AnimData.TacticalReloadAnim({
RArmWeld,
LArmWeld,
GunWeld,
WeaponInHand,
ViewModel,
})
end)
end
function JammedAnim()
pcall(function()
AnimData.JammedAnim({
RArmWeld,
LArmWeld,
GunWeld,
WeaponInHand,
ViewModel,
})
end)
end
function PumpAnim()
reloading = true
pcall(function()
AnimData.PumpAnim({
RArmWeld,
LArmWeld,
GunWeld,
WeaponInHand,
ViewModel,
})
end)
reloading = false
end
function MagCheckAnim()
CheckingMag = true
pcall(function()
AnimData.MagCheck({
RArmWeld,
LArmWeld,
GunWeld,
WeaponInHand,
ViewModel,
})
end)
CheckingMag = false
end
function meleeAttack()
pcall(function()
AnimData.meleeAttack({
RArmWeld,
LArmWeld,
GunWeld,
WeaponInHand,
ViewModel,
})
end)
end
function GrenadeReady()
pcall(function()
AnimData.GrenadeReady({
RArmWeld,
LArmWeld,
GunWeld,
WeaponInHand,
ViewModel,
})
end)
end
function GrenadeThrow()
pcall(function()
AnimData.GrenadeThrow({
RArmWeld,
LArmWeld,
GunWeld,
WeaponInHand,
ViewModel,
})
end)
end
|
function Prone()UpdateAmmo()L_104_:FireServer("\080\114\111\110\101");(L_14_:Create(L_3_:WaitForChild("\072\117\109\097\110\111\105\100"),TweenInfo.new(.3),{CameraOffset=Vector3.new(0,-3,0)})):Play();(L_3_:WaitForChild("\072\117\109\097\110\111\105\100")).WalkSpeed=4 L_144_=4 L_143_=.025 L_61_=true Proned2=Vector3.new(0,.5,.5)L_119_(L_9_,CFrame.new(0,-2.4201169,-0.0385534465,-0.99999994,-5.86197757e-12,-4.54747351e-13,5.52669195e-12,.998915195,.0465667509,0,.0465667509,-0.998915195),nil,function(a)return math.sin(math.rad(a))end,.25)L_119_(L_10_,CFrame.new(1.00000191,-1,-5.96046448e-08,1.31237243e-11,-0.344507754,.938783348,0,.938783467,.344507784,-1,0,-1.86264515e-09),nil,function(a)return math.sin(math.rad(a))end,.25)L_119_(L_11_,CFrame.new(-0.999996185,-1,-1.1920929e-07,-2.58566502e-11,.314521015,-0.949250221,0,.94925046,.314521164,1,3.7252903e-09,1.86264515e-09),nil,function(a)return math.sin(math.rad(a))end,.25)end function Stand()UpdateAmmo()L_104_:FireServer("\083\116\097\110\100");(L_14_:Create(L_3_:WaitForChild("\072\117\109\097\110\111\105\100"),TweenInfo.new(.3),{CameraOffset=Vector3.new(0,0,0)})):Play()L_61_=false if not L_60_ then(L_3_:WaitForChild("\072\117\109\097\110\111\105\100")).WalkSpeed=16 L_143_=.2 L_144_=17 elseif L_60_ then(L_3_:WaitForChild("\072\117\109\097\110\111\105\100")).WalkSpeed=16 L_144_=10 L_143_=.02 end Proned2=Vector3.new(0,0,0)L_119_(L_9_,CFrame.new(0,0,0,-1,0,0,0,0,1,0,1,0),nil,function(a)return math.sin(math.rad(a))end,.25)L_119_(L_10_,CFrame.new(1,-1,0,0,0,1,0,1,0,-1,0,0),nil,function(a)return math.sin(math.rad(a))end,.25)L_119_(L_11_,CFrame.new(-1,-1,0,0,0,-1,0,1,0,1,0,0),nil,function(a)return math.sin(math.rad(a))end,.25)end function Crouch()UpdateAmmo()L_104_:FireServer("\067\114\111\117\099\104");(L_14_:Create(L_3_:WaitForChild("\072\117\109\097\110\111\105\100"),TweenInfo.new(.3),{CameraOffset=Vector3.new(0,-1,0)})):Play();(L_3_:WaitForChild("\072\117\109\097\110\111\105\100")).WalkSpeed=9 L_144_=9 L_143_=.035 L_61_=true Proned2=Vector3.new(0,0,0)L_119_(L_9_,CFrame.new(0,-1.04933882,0,-1,0,-1.88871293e-12,1.88871293e-12,-3.55271368e-15,1,0,1,-3.55271368e-15),nil,function(a)return math.sin(math.rad(a))end,.25)L_119_(L_10_,CFrame.new(1,.0456044674,-0.494239986,6.82121026e-13,-1.22639676e-11,1,-0.058873821,.998265445,-1.09836602e-11,-0.998265445,-0.058873821,0),nil,function(a)return math.sin(math.rad(a))end,.25)L_119_(L_11_,CFrame.new(-1.00000381,-0.157019258,-0.471293032,-8.7538865e-12,-8.7538865e-12,-1,.721672177,.692235112,1.64406284e-11,.692235112,-0.721672177,0),nil,function(a)return math.sin(math.rad(a))end,.25)L_119_(L_6_:WaitForChild("\078\101\099\107"),nil,CFrame.new(0,-0.5,0,-1,0,0,0,0,1,0,1,0),function(a)return math.sin(math.rad(a))end,.25)end function LeanRight()if L_87_~=2 then L_104_:FireServer("\076\101\097\110\082\105\103\104\116")L_119_(L_9_,nil,CFrame.new(0,.200000003,0,-0.939692616,0,-0.342020124,-0.342020124,0,.939692616,0,1,0),function(a)return math.sin(math.rad(a))end,.25)L_119_(L_10_,nil,CFrame.new(.300000012,.600000024,0,0,.342020124,.939692616,0,.939692616,-0.342020124,-1,0,0),function(a)return math.sin(math.rad(a))end,.25)L_119_(L_11_,nil,nil,function(a)return math.sin(math.rad(a))end,.25)L_119_(L_6_:WaitForChild("\067\108\111\110\101"),nil,CFrame.new(-0.400000006,-0.300000012,0,-1,0,0,0,0,1,0,1,0),function(a)return math.sin(math.rad(a))end,.25)if not L_61_ then(L_14_:Create(L_3_:WaitForChild("\072\117\109\097\110\111\105\100"),TweenInfo.new(.3),{CameraOffset=Vector3.new(1,-0.5,0)})):Play()elseif L_61_ then if L_87_==1 then(L_14_:Create(L_3_:WaitForChild("\072\117\109\097\110\111\105\100"),TweenInfo.new(.3),{CameraOffset=Vector3.new(1,-1.5,0)})):Play()end end end end function LeanLeft()if L_87_~=2 then L_104_:FireServer("\076\101\097\110\076\101\102\116")L_119_(L_9_,nil,CFrame.new(0,.200000003,0,-0.939692616,0,.342020124,.342020124,0,.939692616,0,1,0),function(a)return math.sin(math.rad(a))end,.25)L_119_(L_10_,nil,nil,function(a)return math.sin(math.rad(a))end,.25)L_119_(L_11_,nil,CFrame.new(-0.300000012,.600000024,0,0,-0.342020124,-0.939692616,0,.939692616,-0.342020124,1,0,0),function(a)return math.sin(math.rad(a))end,.25)L_119_(L_6_:WaitForChild("\067\108\111\110\101"),nil,CFrame.new(.400000006,-0.300000012,0,-1,0,0,0,0,1,0,1,0),function(a)return math.sin(math.rad(a))end,.25)if not L_61_ then(L_14_:Create(L_3_:WaitForChild("\072\117\109\097\110\111\105\100"),TweenInfo.new(.3),{CameraOffset=Vector3.new(-1,-0.5,0)})):Play()elseif L_61_ then if L_87_==1 then(L_14_:Create(L_3_:WaitForChild("\072\117\109\097\110\111\105\100"),TweenInfo.new(.3),{CameraOffset=Vector3.new(-1,-1.5,0)})):Play()end end end end function Unlean()if L_87_~=2 then L_104_:FireServer("\085\110\108\101\097\110")L_119_(L_9_,nil,CFrame.new(0,0,0,-1,0,0,0,0,1,0,1,0),function(a)return math.sin(math.rad(a))end,.25)L_119_(L_10_,nil,CFrame.new(.5,1,0,0,0,1,0,1,0,-1,0,0),function(a)return math.sin(math.rad(a))end,.25)L_119_(L_11_,nil,CFrame.new(-0.5,1,0,0,0,-1,0,1,0,1,0,0),function(a)return math.sin(math.rad(a))end,.25)if L_6_:FindFirstChild("\067\108\111\110\101")then L_119_(L_6_:WaitForChild("\067\108\111\110\101"),nil,CFrame.new(0,-0.5,0,-1,0,0,0,0,1,0,1,0),function(a)return math.sin(math.rad(a))end,.25)end if not L_61_ then(L_14_:Create(L_3_:WaitForChild("\072\117\109\097\110\111\105\100"),TweenInfo.new(.3),{CameraOffset=Vector3.new(0,0,0)})):Play()elseif L_61_ then if L_87_==1 then(L_14_:Create(L_3_:WaitForChild("\072\117\109\097\110\111\105\100"),TweenInfo.new(.3),{CameraOffset=Vector3.new(0,-1,0)})):Play()end end end end local a=false L_99_.InputBegan:connect(function(I,X)if not X and L_15_==true then if L_15_ then if I.KeyCode==Enum.KeyCode.C then if L_87_==0 and(not L_63_ and L_15_)then L_87_=1 Crouch()L_88_=false L_90_=true L_89_=false elseif L_87_==1 and(not L_63_ and L_15_)then L_87_=2 Prone()L_90_=false L_88_=true L_89_=false a=true end end if I.KeyCode==Enum.KeyCode.X then if L_87_==2 and(not L_63_ and L_15_)then a=false L_87_=1 Crouch()L_88_=false L_90_=true L_89_=false elseif L_87_==1 and(not L_63_ and L_15_)then L_87_=0 Stand()L_88_=false L_90_=false L_89_=true end end end end end) | --// Stances
function Prone()
UpdateAmmo()
L_104_:FireServer("Prone")
L_14_:Create(L_3_:WaitForChild("Humanoid"), TweenInfo.new(0.3), {
CameraOffset = Vector3.new(0, -3, 0),
}):Play()
L_3_:WaitForChild("Humanoid").WalkSpeed = 4
L_144_ = 4
L_143_ = 0.025
L_61_ = true
Proned2 = Vector3.new(0, 0.5, 0.5)
L_119_(
L_9_,
CFrame.new(
0,
-2.4201169,
-0.0385534465,
-0.99999994,
-5.86197757e-012,
-4.54747351e-013,
5.52669195e-012,
0.998915195,
0.0465667509,
0,
0.0465667509,
-0.998915195
),
nil,
function(L_269_arg1)
return math.sin(math.rad(L_269_arg1))
end,
0.25
)
L_119_(
L_10_,
CFrame.new(
1.00000191,
-1,
-5.96046448e-008,
1.31237243e-011,
-0.344507754,
0.938783348,
0,
0.938783467,
0.344507784,
-1,
0,
-1.86264515e-009
),
nil,
function(L_270_arg1)
return math.sin(math.rad(L_270_arg1))
end,
0.25
)
L_119_(
L_11_,
CFrame.new(
-0.999996185,
-1,
-1.1920929e-007,
-2.58566502e-011,
0.314521015,
-0.949250221,
0,
0.94925046,
0.314521164,
1,
3.7252903e-009,
1.86264515e-009
),
nil,
function(L_271_arg1)
return math.sin(math.rad(L_271_arg1))
end,
0.25
)
end
function Stand()
UpdateAmmo()
L_104_:FireServer("Stand")
L_14_:Create(L_3_:WaitForChild("Humanoid"), TweenInfo.new(0.3), {
CameraOffset = Vector3.new(0, 0, 0),
}):Play()
L_61_ = false
if not L_60_ then
L_3_:WaitForChild("Humanoid").WalkSpeed = 16
L_143_ = 0.2
L_144_ = 17
elseif L_60_ then
L_3_:WaitForChild("Humanoid").WalkSpeed = 16
L_144_ = 10
L_143_ = 0.02
end
Proned2 = Vector3.new(0, 0, 0)
L_119_(L_9_, CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0), nil, function(L_272_arg1)
return math.sin(math.rad(L_272_arg1))
end, 0.25)
L_119_(L_10_, CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0), nil, function(L_273_arg1)
return math.sin(math.rad(L_273_arg1))
end, 0.25)
L_119_(L_11_, CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0), nil, function(L_274_arg1)
return math.sin(math.rad(L_274_arg1))
end, 0.25)
end
function Crouch()
UpdateAmmo()
L_104_:FireServer("Crouch")
L_14_:Create(L_3_:WaitForChild("Humanoid"), TweenInfo.new(0.3), {
CameraOffset = Vector3.new(0, -1, 0),
}):Play()
L_3_:WaitForChild("Humanoid").WalkSpeed = 9
L_144_ = 9
L_143_ = 0.035
L_61_ = true
Proned2 = Vector3.new(0, 0, 0)
L_119_(
L_9_,
CFrame.new(
0,
-1.04933882,
0,
-1,
0,
-1.88871293e-012,
1.88871293e-012,
-3.55271368e-015,
1,
0,
1,
-3.55271368e-015
),
nil,
function(L_275_arg1)
return math.sin(math.rad(L_275_arg1))
end,
0.25
)
L_119_(
L_10_,
CFrame.new(
1,
0.0456044674,
-0.494239986,
6.82121026e-013,
-1.22639676e-011,
1,
-0.058873821,
0.998265445,
-1.09836602e-011,
-0.998265445,
-0.058873821,
0
),
nil,
function(L_276_arg1)
return math.sin(math.rad(L_276_arg1))
end,
0.25
)
L_119_(
L_11_,
CFrame.new(
-1.00000381,
-0.157019258,
-0.471293032,
-8.7538865e-012,
-8.7538865e-012,
-1,
0.721672177,
0.692235112,
1.64406284e-011,
0.692235112,
-0.721672177,
0
),
nil,
function(L_277_arg1)
return math.sin(math.rad(L_277_arg1))
end,
0.25
)
L_119_(L_6_:WaitForChild("Neck"), nil, CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0), function(L_278_arg1)
return math.sin(math.rad(L_278_arg1))
end, 0.25)
end
function LeanRight()
if L_87_ ~= 2 then
L_104_:FireServer("LeanRight")
L_119_(
L_9_,
nil,
CFrame.new(0, 0.200000003, 0, -0.939692616, 0, -0.342020124, -0.342020124, 0, 0.939692616, 0, 1, 0),
function(L_279_arg1)
return math.sin(math.rad(L_279_arg1))
end,
0.25
)
L_119_(
L_10_,
nil,
CFrame.new(0.300000012, 0.600000024, 0, 0, 0.342020124, 0.939692616, 0, 0.939692616, -0.342020124, -1, 0, 0),
function(L_280_arg1)
return math.sin(math.rad(L_280_arg1))
end,
0.25
)
L_119_(L_11_, nil, nil, function(L_281_arg1)
return math.sin(math.rad(L_281_arg1))
end, 0.25)
L_119_(
L_6_:WaitForChild("Clone"),
nil,
CFrame.new(-0.400000006, -0.300000012, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0),
function(L_282_arg1)
return math.sin(math.rad(L_282_arg1))
end,
0.25
)
if not L_61_ then
L_14_:Create(L_3_:WaitForChild("Humanoid"), TweenInfo.new(0.3), {
CameraOffset = Vector3.new(1, -0.5, 0),
}):Play()
elseif L_61_ then
if L_87_ == 1 then
L_14_:Create(L_3_:WaitForChild("Humanoid"), TweenInfo.new(0.3), {
CameraOffset = Vector3.new(1, -1.5, 0),
}):Play()
end
end
end
end
function LeanLeft()
if L_87_ ~= 2 then
L_104_:FireServer("LeanLeft")
L_119_(
L_9_,
nil,
CFrame.new(0, 0.200000003, 0, -0.939692616, 0, 0.342020124, 0.342020124, 0, 0.939692616, 0, 1, 0),
function(L_283_arg1)
return math.sin(math.rad(L_283_arg1))
end,
0.25
)
L_119_(L_10_, nil, nil, function(L_284_arg1)
return math.sin(math.rad(L_284_arg1))
end, 0.25)
L_119_(
L_11_,
nil,
CFrame.new(
-0.300000012,
0.600000024,
0,
0,
-0.342020124,
-0.939692616,
0,
0.939692616,
-0.342020124,
1,
0,
0
),
function(L_285_arg1)
return math.sin(math.rad(L_285_arg1))
end,
0.25
)
L_119_(
L_6_:WaitForChild("Clone"),
nil,
CFrame.new(0.400000006, -0.300000012, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0),
function(L_286_arg1)
return math.sin(math.rad(L_286_arg1))
end,
0.25
)
if not L_61_ then
L_14_:Create(L_3_:WaitForChild("Humanoid"), TweenInfo.new(0.3), {
CameraOffset = Vector3.new(-1, -0.5, 0),
}):Play()
elseif L_61_ then
if L_87_ == 1 then
L_14_:Create(L_3_:WaitForChild("Humanoid"), TweenInfo.new(0.3), {
CameraOffset = Vector3.new(-1, -1.5, 0),
}):Play()
end
end
end
end
function Unlean()
if L_87_ ~= 2 then
L_104_:FireServer("Unlean")
L_119_(L_9_, nil, CFrame.new(0, 0, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0), function(L_287_arg1)
return math.sin(math.rad(L_287_arg1))
end, 0.25)
L_119_(L_10_, nil, CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0), function(L_288_arg1)
return math.sin(math.rad(L_288_arg1))
end, 0.25)
L_119_(L_11_, nil, CFrame.new(-0.5, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0), function(L_289_arg1)
return math.sin(math.rad(L_289_arg1))
end, 0.25)
if L_6_:FindFirstChild("Clone") then
L_119_(
L_6_:WaitForChild("Clone"),
nil,
CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0),
function(L_290_arg1)
return math.sin(math.rad(L_290_arg1))
end,
0.25
)
end
if not L_61_ then
L_14_:Create(L_3_:WaitForChild("Humanoid"), TweenInfo.new(0.3), {
CameraOffset = Vector3.new(0, 0, 0),
}):Play()
elseif L_61_ then
if L_87_ == 1 then
L_14_:Create(L_3_:WaitForChild("Humanoid"), TweenInfo.new(0.3), {
CameraOffset = Vector3.new(0, -1, 0),
}):Play()
end
end
end
end
local L_154_ = false
L_99_.InputBegan:connect(function(L_291_arg1, L_292_arg2)
if not L_292_arg2 and L_15_ == true then
if L_15_ then
if L_291_arg1.KeyCode == Enum.KeyCode.C then
if L_87_ == 0 and not L_63_ and L_15_ then
L_87_ = 1
Crouch()
L_88_ = false
L_90_ = true
L_89_ = false
elseif L_87_ == 1 and not L_63_ and L_15_ then
L_87_ = 2
Prone()
L_90_ = false
L_88_ = true
L_89_ = false
L_154_ = true
end
end
if L_291_arg1.KeyCode == Enum.KeyCode.X then
if L_87_ == 2 and not L_63_ and L_15_ then
L_154_ = false
L_87_ = 1
Crouch()
L_88_ = false
L_90_ = true
L_89_ = false
elseif L_87_ == 1 and not L_63_ and L_15_ then
L_87_ = 0
Stand()
L_88_ = false
L_90_ = false
L_89_ = true
end
end
end
end
end)
|
playAnimation("\105\100\108\101",.1,Humanoid)pose="\083\116\097\110\100\105\110\103"while Figure.Parent~=nil do local a,I=wait(.1)move(I)end | -- initialize to idle
playAnimation("idle", 0.1, Humanoid)
pose = "Standing"
while Figure.Parent ~= nil do
local _, time = wait(0.1)
move(time)
end
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.