input
stringlengths 6
11.4M
| output
stringlengths 6
4.94M
|
---|---|
Tune.Peripherals={MSteerWidth=67,MSteerDZone=10;ControlLDZone=5,ControlRDZone=5}Tune.Controls={ToggleABS=Enum.KeyCode.Y,ToggleTransMode=Enum.KeyCode.M,Throttle=Enum.KeyCode.Up;Brake=Enum.KeyCode.Down,SteerLeft=Enum.KeyCode.Left;SteerRight=Enum.KeyCode.Right,Throttle2=Enum.KeyCode.W,Brake2=Enum.KeyCode.S;SteerLeft2=Enum.KeyCode.A,SteerRight2=Enum.KeyCode.D;ShiftUp=Enum.KeyCode.E;ShiftDown=Enum.KeyCode.Q,Clutch=Enum.KeyCode.LeftShift;PBrake=Enum.KeyCode.P;MouseThrottle=Enum.UserInputType.MouseButton1,MouseBrake=Enum.UserInputType.MouseButton2,MouseClutch=Enum.KeyCode.W,MouseShiftUp=Enum.KeyCode.E;MouseShiftDown=Enum.KeyCode.Q;MousePBrake=Enum.KeyCode.LeftShift,ContlrThrottle=Enum.KeyCode.ButtonR2,ContlrBrake=Enum.KeyCode.ButtonL2,ContlrSteer=Enum.KeyCode.Thumbstick1,ContlrShiftUp=Enum.KeyCode.ButtonY;ContlrShiftDown=Enum.KeyCode.ButtonX,ContlrClutch=Enum.KeyCode.ButtonR1,ContlrPBrake=Enum.KeyCode.ButtonL1;ContlrToggleTMode=Enum.KeyCode.DPadUp,ContlrToggleTCS=Enum.KeyCode.DPadDown,ContlrToggleABS=Enum.KeyCode.DPadRight} | --[[[Default Controls]]
--Peripheral Deadzones
Tune.Peripherals = {
MSteerWidth = 67, -- Mouse steering control width (0 - 100% of screen width)
MSteerDZone = 10, -- Mouse steering deadzone (0 - 100%)
ControlLDZone = 5, -- Controller steering L-deadzone (0 - 100%)
ControlRDZone = 5, -- Controller steering R-deadzone (0 - 100%)
}
--Control Mapping
Tune.Controls = {
--Keyboard Controls
--Mode Toggles
ToggleABS = Enum.KeyCode.Y,
ToggleTransMode = Enum.KeyCode.M,
--Primary Controls
Throttle = Enum.KeyCode.Up,
Brake = Enum.KeyCode.Down,
SteerLeft = Enum.KeyCode.Left,
SteerRight = Enum.KeyCode.Right,
--Secondary Controls
Throttle2 = Enum.KeyCode.W,
Brake2 = Enum.KeyCode.S,
SteerLeft2 = Enum.KeyCode.A,
SteerRight2 = Enum.KeyCode.D,
--Manual Transmission
ShiftUp = Enum.KeyCode.E,
ShiftDown = Enum.KeyCode.Q,
Clutch = Enum.KeyCode.LeftShift,
--Handbrake
PBrake = Enum.KeyCode.P,
--Mouse Controls
MouseThrottle = Enum.UserInputType.MouseButton1,
MouseBrake = Enum.UserInputType.MouseButton2,
MouseClutch = Enum.KeyCode.W,
MouseShiftUp = Enum.KeyCode.E,
MouseShiftDown = Enum.KeyCode.Q,
MousePBrake = Enum.KeyCode.LeftShift,
--Controller Mapping
ContlrThrottle = Enum.KeyCode.ButtonR2,
ContlrBrake = Enum.KeyCode.ButtonL2,
ContlrSteer = Enum.KeyCode.Thumbstick1,
ContlrShiftUp = Enum.KeyCode.ButtonY,
ContlrShiftDown = Enum.KeyCode.ButtonX,
ContlrClutch = Enum.KeyCode.ButtonR1,
ContlrPBrake = Enum.KeyCode.ButtonL1,
ContlrToggleTMode = Enum.KeyCode.DPadUp,
ContlrToggleTCS = Enum.KeyCode.DPadDown,
ContlrToggleABS = Enum.KeyCode.DPadRight,
}
|
function CommonUtil.TableConcat(a,R)for y=1,#R,1 do a[#a+1]=R[y]end return a end | -- Concatenate these two tables, return result.
function CommonUtil.TableConcat(t1, t2)
for i = 1, #t2 do
t1[#t1 + 1] = t2[i]
end
return t1
end
|
function Window.SetEntryText(R,a)Entry.TextBox.Text=a if R:IsVisible()then Entry.TextBox:CaptureFocus()Entry.TextBox.CursorPosition=#a+1 Window:UpdateWindowHeight()end end | --- Sets the text in the command bar text box, and captures focus
function Window:SetEntryText(text)
Entry.TextBox.Text = text
if self:IsVisible() then
Entry.TextBox:CaptureFocus()
Entry.TextBox.CursorPosition = #text + 1
Window:UpdateWindowHeight()
end
end
|
local v=nil local R=nil local E=nil local e=nil local U=nil local Z local a=nil local F=Tool.TextureId local k=game:GetService("\068\101\098\114\105\115")local B=game:GetService("\080\108\097\121\101\114\115")local x local g=nil local J=nil local I=false local H=time() | -- Player specific convenience variables
local MyPlayer = nil
local MyCharacter = nil
local MyHumanoid = nil
local MyTorso = nil
local MyMouse = nil
local RecoilAnim
local RecoilTrack = nil
local IconURL = Tool.TextureId -- URL to the weapon icon asset
local DebrisService = game:GetService("Debris")
local PlayersService = game:GetService("Players")
local FireSound
local OnFireConnection = nil
local OnReloadConnection = nil
local DecreasedAimLastShot = false
local LastSpreadUpdate = time()
|
local function a(a,R,y,k,z,I)for a,D in pairs(a)do if type(a)~="\115\116\114\105\110\103"then y(("\037\115\058 \105\103\110\111\114\101\100 \037\115 \062 \037\113 \040\110\097\109\101 \105\115 \110\111\116 \097 \115\116\114\105\110\103\044 \098\117\116 \097 \037\115\041"):format(k,z,tostring(a),typeof(a)))elseif type(D)~="\116\097\098\108\101"then y(("\037\115\058 \105\103\110\111\114\101\100 \037\115 \062 \037\113 \040\115\099\111\112\101 \108\105\115\116 \105\115 \110\111\116 \097 \116\097\098\108\101\044 \098\117\116 \097 \037\115\041"):format(k,z,a,typeof(D)))elseif#a==0 then y(("\037\115\058 \105\103\110\111\114\101\100 \037\115 \062 \037\113 \040\110\097\109\101 \105\115 \097\110 \101\109\112\116\121 \115\116\114\105\110\103\041"):format(k,z,a))elseif#a>Constants.MAX_LENGTH_NAME then y(("\037\115\058 \105\103\110\111\114\101\100 \037\115 \062 \037\113 \040\110\097\109\101 \101\120\099\101\101\100\115 \037\100 \099\104\097\114\097\099\116\101\114 \108\105\109\105\116\041"):format(k,z,a,Constants.MAX_LENGTH_NAME))else for D,Y in pairs(D)do if type(D)~="\115\116\114\105\110\103"then y(("\037\115\058 \105\103\110\111\114\101\100 \037\115 \062 \037\113 \062 \037\113 \040\115\099\111\112\101 \105\115 \110\111\116 \097 \115\116\114\105\110\103\044 \098\117\116 \097 \037\115\041"):format(k,z,a,tostring(D),typeof(D)))elseif type(Y)~="\116\097\098\108\101"then y(("\037\115\058 \105\103\110\111\114\101\100 \037\115 \062 \037\113 \062 \037\113 \040\100\097\116\097 \108\105\115\116 \105\115 \110\111\116 \097 \116\097\098\108\101\044 \098\117\116 \097 \037\115\041"):format(k,z,a,D,typeof(Y)))elseif#D==0 then y(("\037\115\058 \105\103\110\111\114\101\100 \037\115 \062 \037\113 \062 \037\113 \040\115\099\111\112\101 \105\115 \097\110 \101\109\112\116\121 \115\116\114\105\110\103\041"):format(k,z,a,D))elseif#D>Constants.MAX_LENGTH_SCOPE then y(("\037\115\058 \105\103\110\111\114\101\100 \037\115 \062 \037\113 \062 \037\113 \040\115\099\111\112\101 \101\120\099\101\101\100\115 \037\100 \099\104\097\114\097\099\116\101\114 \108\105\109\105\116\041"):format(k,z,a,D,Constants.MAX_LENGTH_SCOPE))else if not R[a]then R[a]={}end if not R[a][D]then R[a][D]={}end Utils.importPairsFromTable(Y,R[a][D],Interfaces[R[a][D]],y,k,("\037\115 \062 \037\113 \062 \037\113"):format(z,a,D),I)end end end end end function MockDataStoreManager.ImportFromJSON(R,y)local k if type(R)=="\115\116\114\105\110\103"then local a,y=pcall(function()return HttpService:JSONDecode(R)end)if not a then error("\098\097\100 \097\114\103\117\109\101\110\116 \035\049 \116\111 \'\073\109\112\111\114\116\070\114\111\109\074\083\079\078\' \040\115\116\114\105\110\103 \105\115 \110\111\116 \118\097\108\105\100 \106\115\111\110\041",2)end k=y elseif type(R)=="\116\097\098\108\101"then k=Utils.deepcopy(R)else error(("\098\097\100 \097\114\103\117\109\101\110\116 \035\049 \116\111 \'\073\109\112\111\114\116\070\114\111\109\074\083\079\078\' \040\115\116\114\105\110\103 \111\114 \116\097\098\108\101 \101\120\112\101\099\116\101\100\044 \103\111\116 \037\115\041"):format(typeof(R)),2)end local z=warn if y==false then z=function() end end if type(k.GlobalDataStore)=="\116\097\098\108\101"then Utils.importPairsFromTable(k.GlobalDataStore,Data.GlobalDataStore,Interfaces[Data.GlobalDataStore],z,"\073\109\112\111\114\116\070\114\111\109\074\083\079\078","\071\108\111\098\097\108\068\097\116\097\083\116\111\114\101",false)end if type(k.DataStore)=="\116\097\098\108\101"then a(k.DataStore,Data.DataStore,z,"\073\109\112\111\114\116\070\114\111\109\074\083\079\078","\068\097\116\097\083\116\111\114\101",false)end if type(k.OrderedDataStore)=="\116\097\098\108\101"then a(k.OrderedDataStore,Data.OrderedDataStore,z,"\073\109\112\111\114\116\070\114\111\109\074\083\079\078","\079\114\100\101\114\101\100\068\097\116\097\083\116\111\114\101",true)end end return MockDataStoreManager | -- Import into an entire datastore type:
local function importDataStoresFromTable(origin, destination, warnFunc, methodName, prefix, isOrdered)
for name, scopes in pairs(origin) do
if type(name) ~= "string" then
warnFunc(
("%s: ignored %s > %q (name is not a string, but a %s)"):format(
methodName,
prefix,
tostring(name),
typeof(name)
)
)
elseif type(scopes) ~= "table" then
warnFunc(
("%s: ignored %s > %q (scope list is not a table, but a %s)"):format(
methodName,
prefix,
name,
typeof(scopes)
)
)
elseif #name == 0 then
warnFunc(("%s: ignored %s > %q (name is an empty string)"):format(methodName, prefix, name))
elseif #name > Constants.MAX_LENGTH_NAME then
warnFunc(
("%s: ignored %s > %q (name exceeds %d character limit)"):format(
methodName,
prefix,
name,
Constants.MAX_LENGTH_NAME
)
)
else
for scope, data in pairs(scopes) do
if type(scope) ~= "string" then
warnFunc(
("%s: ignored %s > %q > %q (scope is not a string, but a %s)"):format(
methodName,
prefix,
name,
tostring(scope),
typeof(scope)
)
)
elseif type(data) ~= "table" then
warnFunc(
("%s: ignored %s > %q > %q (data list is not a table, but a %s)"):format(
methodName,
prefix,
name,
scope,
typeof(data)
)
)
elseif #scope == 0 then
warnFunc(
("%s: ignored %s > %q > %q (scope is an empty string)"):format(methodName, prefix, name, scope)
)
elseif #scope > Constants.MAX_LENGTH_SCOPE then
warnFunc(
("%s: ignored %s > %q > %q (scope exceeds %d character limit)"):format(
methodName,
prefix,
name,
scope,
Constants.MAX_LENGTH_SCOPE
)
)
else
if not destination[name] then
destination[name] = {}
end
if not destination[name][scope] then
destination[name][scope] = {}
end
Utils.importPairsFromTable(
data,
destination[name][scope],
Interfaces[destination[name][scope]],
warnFunc,
methodName,
("%s > %q > %q"):format(prefix, name, scope),
isOrdered
)
end
end
end
end
end
function MockDataStoreManager.ImportFromJSON(json, verbose)
local content
if type(json) == "string" then
local parsed, value = pcall(function()
return HttpService:JSONDecode(json)
end)
if not parsed then
error("bad argument #1 to 'ImportFromJSON' (string is not valid json)", 2)
end
content = value
elseif type(json) == "table" then
content = Utils.deepcopy(json)
else
error(("bad argument #1 to 'ImportFromJSON' (string or table expected, got %s)"):format(typeof(json)), 2)
end
local warnFunc = warn -- assume verbose as default
if verbose == false then -- intentional formatting
warnFunc = function() end
end
if type(content.GlobalDataStore) == "table" then
Utils.importPairsFromTable(
content.GlobalDataStore,
Data.GlobalDataStore,
Interfaces[Data.GlobalDataStore],
warnFunc,
"ImportFromJSON",
"GlobalDataStore",
false
)
end
if type(content.DataStore) == "table" then
importDataStoresFromTable(content.DataStore, Data.DataStore, warnFunc, "ImportFromJSON", "DataStore", false)
end
if type(content.OrderedDataStore) == "table" then
importDataStoresFromTable(
content.OrderedDataStore,
Data.OrderedDataStore,
warnFunc,
"ImportFromJSON",
"OrderedDataStore",
true
)
end
end
return MockDataStoreManager
|
Tune.SteerInner=26 Tune.SteerOuter=25 Tune.SteerSpeed=.06 Tune.ReturnSpeed=.1 Tune.SteerDecay=330 Tune.MinSteer=10 Tune.MSteerExp=1 Tune.SteerD=1000 Tune.SteerMaxTorque=50000 Tune.SteerP=100000 | --[[Steering]]
Tune.SteerInner = 26 -- Inner wheel steering angle (in degrees)
Tune.SteerOuter = 25 -- Outer wheel steering angle (in degrees)
Tune.SteerSpeed = 0.06 -- Steering increment per tick (in degrees)
Tune.ReturnSpeed = 0.1 -- Steering increment per tick (in degrees)
Tune.SteerDecay = 330 -- 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
|
bike.FrontSection.TripleTreeHinge.Size=Vector3.new(_Tune.HingeSize,_Tune.HingeSize,_Tune.HingeSize)bike.FrontSection.TripleTreeHinge.CustomPhysicalProperties=PhysicalProperties.new(_Tune.HingeDensity,0,0,100,100)if _Tune.HingesVisible or _Tune.Debug then bike.FrontSection.TripleTreeHinge.Transparency=.75 else bike.FrontSection.TripleTreeHinge.Transparency=1 end local v=bike.FrontSection.TripleTreeHinge:Clone()v.Parent=bike.Body v.Name="\083\116\101\101\114\105\110\103\072\105\110\103\101"local R=Instance.new("\065\116\116\097\099\104\109\101\110\116",v)local E=Instance.new("\065\116\116\097\099\104\109\101\110\116",bike.FrontSection.TripleTreeHinge)local e=Instance.new("\072\105\110\103\101\067\111\110\115\116\114\097\105\110\116",v)e.Attachment0=R e.Attachment1=E e.LimitsEnabled=true e.UpperAngle=_Tune.SteerAngle e.LowerAngle=-_Tune.SteerAngle e.ActuatorType="\078\111\110\101" | --Handlebars hinge
bike.FrontSection.TripleTreeHinge.Size = Vector3.new(_Tune.HingeSize, _Tune.HingeSize, _Tune.HingeSize)
bike.FrontSection.TripleTreeHinge.CustomPhysicalProperties = PhysicalProperties.new(_Tune.HingeDensity, 0, 0, 100, 100)
if _Tune.HingesVisible or _Tune.Debug then
bike.FrontSection.TripleTreeHinge.Transparency = 0.75
else
bike.FrontSection.TripleTreeHinge.Transparency = 1
end
local shinge = bike.FrontSection.TripleTreeHinge:Clone()
shinge.Parent = bike.Body
shinge.Name = "SteeringHinge"
local shingea = Instance.new("Attachment", shinge)
local shingeb = Instance.new("Attachment", bike.FrontSection.TripleTreeHinge)
local shingec = Instance.new("HingeConstraint", shinge)
shingec.Attachment0 = shingea
shingec.Attachment1 = shingeb
shingec.LimitsEnabled = true
shingec.UpperAngle = _Tune.SteerAngle
shingec.LowerAngle = -_Tune.SteerAngle
shingec.ActuatorType = "None"
|
local v=game:GetService("\080\108\097\121\101\114\115")local R=game:GetService("\082\117\110\083\101\114\118\105\099\101")local E=game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")local e=(UserSettings()):GetService("\085\115\101\114\071\097\109\101\083\101\116\116\105\110\103\115") | --[[ Roblox Services ]]
--
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local UserGameSettings = UserSettings():GetService("UserGameSettings")
|
Tune.TransModes={"\065\117\116\111","\083\101\109\105";"\077\097\110\117\097\108"}Tune.AutoShiftMode="\083\112\101\101\100"Tune.AutoUpThresh=-200 Tune.AutoDownThresh=1400 Tune.FinalDrive=3.3 Tune.Ratios={3.3;0,2.89,1.99;1.51;1.2,1.0;.85}Tune.FDMult=1.5 | --[[Transmission]]
Tune.TransModes = { "Auto", "Semi", "Manual" } --[[
[Modes]
"Auto" : Automatic shifting
"Semi" : Clutchless manual shifting, dual clutch transmission
"Manual" : Manual shifting with clutch
>Include within brackets
eg: {"Semi"} or {"Auto", "Manual"}
>First mode is default mode ]]
--Automatic Settings
Tune.AutoShiftMode = "Speed" --[[
[Modes]
"Speed" : Shifts based on wheel speed
"RPM" : Shifts based on RPM ]]
Tune.AutoUpThresh = -200 --Automatic upshift point (relative to peak RPM, positive = Over-rev)
Tune.AutoDownThresh = 1400 --Automatic downshift point (relative to peak RPM, positive = Under-rev)
--Gear Ratios
Tune.FinalDrive = 3.30 -- Gearing determines top speed and wheel torque
Tune.Ratios = { -- Higher ratio = more torque, Lower ratio = higher top speed
--[[Reverse]]
3.30, -- Copy and paste a ratio to add a gear
--[[Neutral]]
0, -- Ratios can also be deleted
--[[ 1 ]]
2.89, -- Reverse, Neutral, and 1st gear are required
--[[ 2 ]]
1.99,
--[[ 3 ]]
1.51,
--[[ 4 ]]
1.20,
--[[ 5 ]]
1.00,
--[[ 6 ]]
0.85,
}
Tune.FDMult = 1.5 -- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
|
local v=_Tune.Horsepower/100 local R=(((_Tune.Horsepower*(_TPsi*(_Tune.T_Efficiency/10)))/7.5)/2)/100 local E=(((_Tune.Horsepower*(_SPsi*(_Tune.S_Efficiency/10)))/7.5)/2)/100 local e=_Tune.PeakRPM/1000 local U=_Tune.PeakSharpness local Z=_Tune.CurveMult local a=_Tune.EqPoint/1000 function CurveN(R)R=R/1000 return(-(R-e)^2*math.min(v/e^2,Z^(e/v))+v)*(R-R^U/(U*e^(U-1)))end local F=CurveN(_Tune.PeakRPM)function CurveT(v)v=v/1000 return(-(v-e)^2*math.min(R/e^2,Z^(e/R))+R)*(v-v^U/(U*e^(U-1)))end local k=CurveT(_Tune.PeakRPM)function CurveS(v)v=v/1000 return(-(v-e)^2*math.min(E/e^2,Z^(e/E))+E)*(v-v^U/(U*e^(U-1)))end local B=CurveS(_Tune.PeakRPM) | --Engine Curve
local HP = _Tune.Horsepower / 100
local HP_T = ((_Tune.Horsepower * (_TPsi * (_Tune.T_Efficiency / 10)) / 7.5) / 2) / 100
local HP_S = ((_Tune.Horsepower * (_SPsi * (_Tune.S_Efficiency / 10)) / 7.5) / 2) / 100
local Peak = _Tune.PeakRPM / 1000
local Sharpness = _Tune.PeakSharpness
local CurveMult = _Tune.CurveMult
local EQ = _Tune.EqPoint / 1000
function CurveN(RPM)
RPM = RPM / 1000
return ((-(RPM - Peak) ^ 2) * math.min(HP / (Peak ^ 2), CurveMult ^ (Peak / HP)) + HP)
* (RPM - ((RPM ^ Sharpness) / (Sharpness * Peak ^ (Sharpness - 1))))
end
local PeakCurveN = CurveN(_Tune.PeakRPM)
function CurveT(RPM)
RPM = RPM / 1000
return ((-(RPM - Peak) ^ 2) * math.min(HP_T / (Peak ^ 2), CurveMult ^ (Peak / HP_T)) + HP_T)
* (RPM - ((RPM ^ Sharpness) / (Sharpness * Peak ^ (Sharpness - 1))))
end
local PeakCurveT = CurveT(_Tune.PeakRPM)
function CurveS(RPM)
RPM = RPM / 1000
return ((-(RPM - Peak) ^ 2) * math.min(HP_S / (Peak ^ 2), CurveMult ^ (Peak / HP_S)) + HP_S)
* (RPM - ((RPM ^ Sharpness) / (Sharpness * Peak ^ (Sharpness - 1))))
end
local PeakCurveS = CurveS(_Tune.PeakRPM)
|
local v=require(script.Parent:WaitForChild("\075\101\121\098\111\097\114\100"))local R=setmetatable({},v)R.__index=R function R.new(E)local e=setmetatable(v.new(E),R)e.fingerTouches={}e.numUnsunkTouches=0 e.mouse1Down=tick()e.mouse1DownPos=Vector2.new()e.mouse2DownTime=tick()e.mouse2DownPos=Vector2.new()e.mouse2UpTime=tick()e.keyboardMoveVector=ZERO_VECTOR3 e.tapConn=nil e.inputBeganConn=nil e.inputChangedConn=nil e.inputEndedConn=nil e.humanoidDiedConn=nil e.characterChildAddedConn=nil e.onCharacterAddedConn=nil e.characterChildRemovedConn=nil e.renderSteppedConn=nil e.menuOpenedConnection=nil e.running=false e.wasdEnabled=false return e end function R.DisconnectEvents(v)DisconnectEvent(v.tapConn)DisconnectEvent(v.inputBeganConn)DisconnectEvent(v.inputChangedConn)DisconnectEvent(v.inputEndedConn)DisconnectEvent(v.humanoidDiedConn)DisconnectEvent(v.characterChildAddedConn)DisconnectEvent(v.onCharacterAddedConn)DisconnectEvent(v.renderSteppedConn)DisconnectEvent(v.characterChildRemovedConn)DisconnectEvent(v.menuOpenedConnection)end function R.OnTouchBegan(E,v,R)if E.fingerTouches[v]==nil and not R then E.numUnsunkTouches=E.numUnsunkTouches+1 end E.fingerTouches[v]=R end function R.OnTouchChanged(E,v,R)if E.fingerTouches[v]==nil then E.fingerTouches[v]=R if not R then E.numUnsunkTouches=E.numUnsunkTouches+1 end end end function R.OnTouchEnded(E,v,R)if E.fingerTouches[v]~=nil and E.fingerTouches[v]==false then E.numUnsunkTouches=E.numUnsunkTouches-1 end E.fingerTouches[v]=nil end function R.OnCharacterAdded(R,v)R:DisconnectEvents()R.inputBeganConn=UserInputService.InputBegan:Connect(function(v,E)if v.UserInputType==Enum.UserInputType.Touch then R:OnTouchBegan(v,E)end if R.wasdEnabled and(E==false and(v.UserInputType==Enum.UserInputType.Keyboard and movementKeys[v.KeyCode]))then CleanupPath()ClickToMoveDisplay.CancelFailureAnimation()end if v.UserInputType==Enum.UserInputType.MouseButton1 then R.mouse1DownTime=tick()R.mouse1DownPos=v.Position end if v.UserInputType==Enum.UserInputType.MouseButton2 then R.mouse2DownTime=tick()R.mouse2DownPos=v.Position end end)R.inputChangedConn=UserInputService.InputChanged:Connect(function(v,E)if v.UserInputType==Enum.UserInputType.Touch then R:OnTouchChanged(v,E)end end)R.inputEndedConn=UserInputService.InputEnded:Connect(function(v,E)if v.UserInputType==Enum.UserInputType.Touch then R:OnTouchEnded(v,E)end if v.UserInputType==Enum.UserInputType.MouseButton2 then R.mouse2UpTime=tick()local E=v.Position local e=ExistingPather or R.keyboardMoveVector.Magnitude<=0 if R.mouse2UpTime-R.mouse2DownTime<.25 and((E-R.mouse2DownPos).magnitude<5 and e)then local v={E}OnTap(v)end end end)R.tapConn=UserInputService.TouchTap:Connect(function(v,R)if not R then OnTap(v,nil,true)end end)R.menuOpenedConnection=GuiService.MenuOpened:Connect(function()CleanupPath()end)local function E(v)if UserInputService.TouchEnabled then if v:IsA("\084\111\111\108")then v.ManualActivationOnly=true end end if v:IsA("\072\117\109\097\110\111\105\100")then DisconnectEvent(R.humanoidDiedConn)R.humanoidDiedConn=v.Died:Connect(function()if ExistingIndicator then DebrisService:AddItem(ExistingIndicator.Model,1)end end)end end R.characterChildAddedConn=v.ChildAdded:Connect(function(v)E(v)end)R.characterChildRemovedConn=v.ChildRemoved:Connect(function(v)if UserInputService.TouchEnabled then if v:IsA("\084\111\111\108")then v.ManualActivationOnly=false end end end)for v,R in pairs(v:GetChildren())do E(R)end end function R.Start(v)v:Enable(true)end function R.Stop(v)v:Enable(false)end function R.CleanupPath(v)CleanupPath()end function R.Enable(e,v,R,E)if v then if not e.running then if Player.Character then e:OnCharacterAdded(Player.Character)end e.onCharacterAddedConn=Player.CharacterAdded:Connect(function(v)e:OnCharacterAdded(v)end)e.running=true end e.touchJumpController=E if e.touchJumpController then e.touchJumpController:Enable(e.jumpEnabled)end else if e.running then e:DisconnectEvents()CleanupPath()if UserInputService.TouchEnabled then local v=Player.Character if v then for v,R in pairs(v:GetChildren())do if R:IsA("\084\111\111\108")then R.ManualActivationOnly=false end end end end e.running=false end if e.touchJumpController and not e.jumpEnabled then e.touchJumpController:Enable(true)end e.touchJumpController=nil end if UserInputService.KeyboardEnabled and v~=e.enabled then e.forwardValue=0 e.backwardValue=0 e.leftValue=0 e.rightValue=0 e.moveVector=ZERO_VECTOR3 if v then e:BindContextActions()e:ConnectFocusEventListeners()else e:UnbindContextActions()e:DisconnectFocusEventListeners()end end e.wasdEnabled=v and R or false e.enabled=v end function R.OnRenderStepped(R,v)R.isJumping=false if ExistingPather then ExistingPather:OnRenderStepped(v)if ExistingPather then R.moveVector=ExistingPather.NextActionMoveDirection R.moveVectorIsCameraRelative=false if ExistingPather.NextActionJump then R.isJumping=true end else R.moveVector=R.keyboardMoveVector R.moveVectorIsCameraRelative=true end else R.moveVector=R.keyboardMoveVector R.moveVectorIsCameraRelative=true end if R.jumpRequested then R.isJumping=true end end | --[[ The ClickToMove Controller Class ]]
--
local KeyboardController = require(script.Parent:WaitForChild("Keyboard"))
local ClickToMove = setmetatable({}, KeyboardController)
ClickToMove.__index = ClickToMove
function ClickToMove.new(CONTROL_ACTION_PRIORITY)
local self = setmetatable(KeyboardController.new(CONTROL_ACTION_PRIORITY), ClickToMove)
self.fingerTouches = {}
self.numUnsunkTouches = 0
-- PC simulation
self.mouse1Down = tick()
self.mouse1DownPos = Vector2.new()
self.mouse2DownTime = tick()
self.mouse2DownPos = Vector2.new()
self.mouse2UpTime = tick()
self.keyboardMoveVector = ZERO_VECTOR3
self.tapConn = nil
self.inputBeganConn = nil
self.inputChangedConn = nil
self.inputEndedConn = nil
self.humanoidDiedConn = nil
self.characterChildAddedConn = nil
self.onCharacterAddedConn = nil
self.characterChildRemovedConn = nil
self.renderSteppedConn = nil
self.menuOpenedConnection = nil
self.running = false
self.wasdEnabled = false
return self
end
function ClickToMove:DisconnectEvents()
DisconnectEvent(self.tapConn)
DisconnectEvent(self.inputBeganConn)
DisconnectEvent(self.inputChangedConn)
DisconnectEvent(self.inputEndedConn)
DisconnectEvent(self.humanoidDiedConn)
DisconnectEvent(self.characterChildAddedConn)
DisconnectEvent(self.onCharacterAddedConn)
DisconnectEvent(self.renderSteppedConn)
DisconnectEvent(self.characterChildRemovedConn)
DisconnectEvent(self.menuOpenedConnection)
end
function ClickToMove:OnTouchBegan(input, processed)
if self.fingerTouches[input] == nil and not processed then
self.numUnsunkTouches = self.numUnsunkTouches + 1
end
self.fingerTouches[input] = processed
end
function ClickToMove:OnTouchChanged(input, processed)
if self.fingerTouches[input] == nil then
self.fingerTouches[input] = processed
if not processed then
self.numUnsunkTouches = self.numUnsunkTouches + 1
end
end
end
function ClickToMove:OnTouchEnded(input, processed)
if self.fingerTouches[input] ~= nil and self.fingerTouches[input] == false then
self.numUnsunkTouches = self.numUnsunkTouches - 1
end
self.fingerTouches[input] = nil
end
function ClickToMove:OnCharacterAdded(character)
self:DisconnectEvents()
self.inputBeganConn = UserInputService.InputBegan:Connect(function(input, processed)
if input.UserInputType == Enum.UserInputType.Touch then
self:OnTouchBegan(input, processed)
end
-- Cancel path when you use the keyboard controls if wasd is enabled.
if
self.wasdEnabled
and processed == false
and input.UserInputType == Enum.UserInputType.Keyboard
and movementKeys[input.KeyCode]
then
CleanupPath()
ClickToMoveDisplay.CancelFailureAnimation()
end
if input.UserInputType == Enum.UserInputType.MouseButton1 then
self.mouse1DownTime = tick()
self.mouse1DownPos = input.Position
end
if input.UserInputType == Enum.UserInputType.MouseButton2 then
self.mouse2DownTime = tick()
self.mouse2DownPos = input.Position
end
end)
self.inputChangedConn = UserInputService.InputChanged:Connect(function(input, processed)
if input.UserInputType == Enum.UserInputType.Touch then
self:OnTouchChanged(input, processed)
end
end)
self.inputEndedConn = UserInputService.InputEnded:Connect(function(input, processed)
if input.UserInputType == Enum.UserInputType.Touch then
self:OnTouchEnded(input, processed)
end
if input.UserInputType == Enum.UserInputType.MouseButton2 then
self.mouse2UpTime = tick()
local currPos = input.Position
-- We allow click to move during path following or if there is no keyboard movement
local allowed = ExistingPather or self.keyboardMoveVector.Magnitude <= 0
if
self.mouse2UpTime - self.mouse2DownTime < 0.25
and (currPos - self.mouse2DownPos).magnitude < 5
and allowed
then
local positions = { currPos }
OnTap(positions)
end
end
end)
self.tapConn = UserInputService.TouchTap:Connect(function(touchPositions, processed)
if not processed then
OnTap(touchPositions, nil, true)
end
end)
self.menuOpenedConnection = GuiService.MenuOpened:Connect(function()
CleanupPath()
end)
local function OnCharacterChildAdded(child)
if UserInputService.TouchEnabled then
if child:IsA("Tool") then
child.ManualActivationOnly = true
end
end
if child:IsA("Humanoid") then
DisconnectEvent(self.humanoidDiedConn)
self.humanoidDiedConn = child.Died:Connect(function()
if ExistingIndicator then
DebrisService:AddItem(ExistingIndicator.Model, 1)
end
end)
end
end
self.characterChildAddedConn = character.ChildAdded:Connect(function(child)
OnCharacterChildAdded(child)
end)
self.characterChildRemovedConn = character.ChildRemoved:Connect(function(child)
if UserInputService.TouchEnabled then
if child:IsA("Tool") then
child.ManualActivationOnly = false
end
end
end)
for _, child in pairs(character:GetChildren()) do
OnCharacterChildAdded(child)
end
end
function ClickToMove:Start()
self:Enable(true)
end
function ClickToMove:Stop()
self:Enable(false)
end
function ClickToMove:CleanupPath()
CleanupPath()
end
function ClickToMove:Enable(enable, enableWASD, touchJumpController)
if enable then
if not self.running then
if Player.Character then -- retro-listen
self:OnCharacterAdded(Player.Character)
end
self.onCharacterAddedConn = Player.CharacterAdded:Connect(function(char)
self:OnCharacterAdded(char)
end)
self.running = true
end
self.touchJumpController = touchJumpController
if self.touchJumpController then
self.touchJumpController:Enable(self.jumpEnabled)
end
else
if self.running then
self:DisconnectEvents()
CleanupPath()
-- Restore tool activation on shutdown
if UserInputService.TouchEnabled then
local character = Player.Character
if character then
for _, child in pairs(character:GetChildren()) do
if child:IsA("Tool") then
child.ManualActivationOnly = false
end
end
end
end
self.running = false
end
if self.touchJumpController and not self.jumpEnabled then
self.touchJumpController:Enable(true)
end
self.touchJumpController = nil
end
-- Extension for initializing Keyboard input as this class now derives from Keyboard
if UserInputService.KeyboardEnabled and enable ~= self.enabled then
self.forwardValue = 0
self.backwardValue = 0
self.leftValue = 0
self.rightValue = 0
self.moveVector = ZERO_VECTOR3
if enable then
self:BindContextActions()
self:ConnectFocusEventListeners()
else
self:UnbindContextActions()
self:DisconnectFocusEventListeners()
end
end
self.wasdEnabled = enable and enableWASD or false
self.enabled = enable
end
function ClickToMove:OnRenderStepped(dt)
-- Reset jump
self.isJumping = false
-- Handle Pather
if ExistingPather then
-- Let the Pather update
ExistingPather:OnRenderStepped(dt)
-- If we still have a Pather, set the resulting actions
if ExistingPather then
-- Setup move (NOT relative to camera)
self.moveVector = ExistingPather.NextActionMoveDirection
self.moveVectorIsCameraRelative = false
-- Setup jump (but do NOT prevent the base Keayboard class from requesting jumps as well)
if ExistingPather.NextActionJump then
self.isJumping = true
end
else
self.moveVector = self.keyboardMoveVector
self.moveVectorIsCameraRelative = true
end
else
self.moveVector = self.keyboardMoveVector
self.moveVectorIsCameraRelative = true
end
-- Handle Keyboard's jump
if self.jumpRequested then
self.isJumping = true
end
end
|
return function(v,R,...)local E=...v.desc.Text=E end | --- Code that will be run when the block is added to a InfoOverlay. Used to customize and edit the appearance or add functionality.
return function(blockGui, blockName, ...)
local description = ...
blockGui.desc.Text = description
end
|
local v=require(script:WaitForChild("\067\108\105\099\107\084\111\077\111\118\101\067\111\110\116\114\111\108\108\101\114"))local R=require(script:WaitForChild("\084\111\117\099\104\084\104\117\109\098\115\116\105\099\107"))local E=require(script:WaitForChild("\084\111\117\099\104\084\104\117\109\098\112\097\100"))local e=require(script:WaitForChild("\084\111\117\099\104\074\117\109\112"))local U=require(script:WaitForChild("\086\101\104\105\099\108\101\067\111\110\116\114\111\108\108\101\114"))local Z=Enum.ContextActionPriority.Default.Value | -- These controllers handle only walk/run movement, jumping is handled by the
-- TouchJump controller if any of these are active
local ClickToMove = require(script:WaitForChild("ClickToMoveController"))
local TouchThumbstick = require(script:WaitForChild("TouchThumbstick"))
local TouchThumbpad = require(script:WaitForChild("TouchThumbpad"))
local TouchJump = require(script:WaitForChild("TouchJump"))
local VehicleController = require(script:WaitForChild("VehicleController"))
local CONTROL_ACTION_PRIORITY = Enum.ContextActionPriority.Default.Value
|
local v=require(game.ReplicatedStorage.CharacterClone)local R={}local function E(E)if E then E.Archivable=true E:WaitForChild("\072\117\109\097\110\111\105\100")local e=v.new(E)local U=v.new(E)dualWorld.PortalA:AddToWorld(e.Clone)dualWorld.PortalB:AddToWorld(U.Clone)table.insert(R,e)table.insert(R,U)end end game.Players.PlayerAdded:Connect(function(v)v.CharacterAdded:Connect(E)end)wait(1)for v,R in next,game.Players:GetPlayers()do E(R.Character)R.CharacterAdded:Connect(E)end;(game:GetService("\082\117\110\083\101\114\118\105\099\101")).RenderStepped:Connect(function(v)for v=1,#R,1 do R[v]:Update()end end) | --
local characterClone = require(game.ReplicatedStorage.CharacterClone)
local clones = {}
local function onCharacter(character)
if character then
character.Archivable = true
character:WaitForChild("Humanoid") -- weird bug
local cloneA = characterClone.new(character)
local cloneB = characterClone.new(character)
dualWorld.PortalA:AddToWorld(cloneA.Clone)
dualWorld.PortalB:AddToWorld(cloneB.Clone)
table.insert(clones, cloneA)
table.insert(clones, cloneB)
end
end
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(onCharacter)
end)
wait(1)
for _, player in next, game.Players:GetPlayers() do
onCharacter(player.Character)
player.CharacterAdded:Connect(onCharacter)
end
game:GetService("RunService").RenderStepped:Connect(function(dt)
for i = 1, #clones do
clones[i]:Update()
end
end)
|
local v=options.unicodeData and require(script:WaitForChild("\095\117\110\105\099\111\100\101\099\104\097\114\095\099\097\116\101\103\111\114\121"))local R=options.unicodeData and require(script:WaitForChild("\095\115\099\114\105\112\116\115"))local E=options.unicodeData and require(script:WaitForChild("\095\120\117\099"))local e=setmetatable({},{__mode="\107"})local U,Z,a={},{},{}local F | --
local u_categories = options.unicodeData and require(script:WaitForChild("_unicodechar_category"))
local chr_scripts = options.unicodeData and require(script:WaitForChild("_scripts"))
local xuc_chr = options.unicodeData and require(script:WaitForChild("_xuc"))
local proxy = setmetatable({}, { __mode = "k" })
local re, re_m, match_m = {}, {}, {}
local lockmsg
|
ReplicatedFirst:RemoveDefaultLoadingScreen()local v=TweenInfo.new(4,Enum.EasingStyle.Linear,Enum.EasingDirection.In,-1)local R=TweenService:Create(loadingRing,v,{Rotation=360})R:Play()wait(12)if not game:IsLoaded()then game.Loaded:Wait()end screenGui:Destroy() | -- Remove the default loading screen
ReplicatedFirst:RemoveDefaultLoadingScreen()
local tweenInfo = TweenInfo.new(4, Enum.EasingStyle.Linear, Enum.EasingDirection.In, -1)
local tween = TweenService:Create(loadingRing, tweenInfo, { Rotation = 360 })
tween:Play()
wait(12) -- Force screen to appear for a minimum number of seconds
if not game:IsLoaded() then
game.Loaded:Wait()
end
screenGui:Destroy()
|
Players.PlayerAdded:Connect(PlayerAdded)Players.PlayerRemoving:Connect(PlayerRemoving)Remote.OnServerEvent:Connect(Fire) | --- RUNTIME
Players.PlayerAdded:Connect(PlayerAdded)
Players.PlayerRemoving:Connect(PlayerRemoving)
Remote.OnServerEvent:Connect(Fire)
|
function Map(v,R,E,e,U)return((v-R)*(U-e))/(E-R)+e end function numLerp(v,R,E)return v+(R-v)*E end function RAND(v,R,E)return numLerp(v,R,math.random())end function Round(v,R)return math.floor(v/R+.5)*R end function getNearestPoint(v,R,E)local e=(v-E).magnitude local U=(R-E).magnitude return math.min(e,U)==e and v or R end | --------------------[ MATH FUNCTIONS ]------------------------------------------------
function Map(Val, fromLow, fromHigh, toLow, toHigh)
return (Val - fromLow) * (toHigh - toLow) / (fromHigh - fromLow) + toLow
end
function numLerp(A, B, Alpha)
return A + (B - A) * Alpha
end
function RAND(Min, Max, Accuracy)
return numLerp(Min, Max, math.random())
--[[local Inverse = 1 / (Accuracy or 1)
return (math.random(Min * Inverse, Max * Inverse) / Inverse)]]
end
function Round(Num, toNearest)
return math.floor(Num / toNearest + 0.5) * toNearest
end
function getNearestPoint(A, B, Origin)
local A2 = (A - Origin).magnitude
local B2 = (B - Origin).magnitude
return (math.min(A2, B2) == A2 and A or B)
end
|
local function v(v,R)if R then if R.Sit then R.Jump=true end R:MoveTo(v)end local E=ClickToMoveDisplay.CreateEndWaypoint(v)ExistingIndicator=E;(coroutine.wrap(function()R.MoveToFinished:wait()E:Destroy()end))()end local function R(v,R,E,e,U)if FFlagUserClickToMoveFollowPathRefactor then ExistingPather=v end v:Start(U)if not FFlagUserClickToMoveFollowPathRefactor then CleanupPath()end if not FFlagUserClickToMoveFollowPathRefactor then ExistingPather=v end PathCompleteListener=v.Finished.Event:Connect(function()if FFlagUserClickToMoveFollowPathRefactor then CleanupPath()end if E then local v=GetEquippedTool(e)if v then v:Activate()end end end)PathFailedListener=v.PathFailed.Event:Connect(function()CleanupPath()if U==nil or U then local v=PlayFailureAnimation and not(ExistingPather and ExistingPather:IsActive())if v then ClickToMoveDisplay.PlayFailureAnimation()end ClickToMoveDisplay.DisplayFailureWaypoint(R)end end)end local function E(v)if ExistingPather and ExistingPather:IsActive()then ExistingPather:Cancel()end if PlayFailureAnimation then ClickToMoveDisplay.PlayFailureAnimation()end ClickToMoveDisplay.DisplayFailureWaypoint(v)end function OnTap(e,U,Z)local a=Workspace.CurrentCamera local F=Player.Character if not CheckAlive()then return end if#e==1 or U then if a then local k=a:ScreenPointToRay(e[1].x,e[1].y)local B=Ray.new(k.Origin,k.Direction*1000)local x=findPlayerHumanoid(Player)local g,J,I=Utility.Raycast(B,true,getIgnoreList())local H,V=Utility.FindCharacterAncestor(g)if Z and(V and StarterGui:GetCore("\065\118\097\116\097\114\067\111\110\116\101\120\116\077\101\110\117\069\110\097\098\108\101\100"))then local v=Players:GetPlayerFromCharacter(V.Parent)if v then CleanupPath()return end end if U then J=U H=nil end if FFlagUserClickToMoveFollowPathRefactor then if J and F then CleanupPath()local v=Pather(J,I)if v:IsValidPath()then R(v,J,H,F)else v:Cleanup()E(J)end end else if UseDirectPath and(J and F)then v(J,x)elseif J and F then local v=Pather(J,I)if v:IsValidPath()then R(v,J,H,F)else if J then E(J)end end end end end elseif#e>=2 then if a then local v=GetEquippedTool(F)if v then v:Activate()end end end end local function e(v)if v then v:Disconnect()end end | -- Remove with FFlagUserClickToMoveFollowPathRefactor
local function HandleDirectMoveTo(hitPt, myHumanoid)
if myHumanoid then
if myHumanoid.Sit then
myHumanoid.Jump = true
end
myHumanoid:MoveTo(hitPt)
end
local endWaypoint = ClickToMoveDisplay.CreateEndWaypoint(hitPt)
ExistingIndicator = endWaypoint
coroutine.wrap(function()
myHumanoid.MoveToFinished:wait()
endWaypoint:Destroy()
end)()
end
local function HandleMoveTo(thisPather, hitPt, hitChar, character, overrideShowPath)
if FFlagUserClickToMoveFollowPathRefactor then
ExistingPather = thisPather
end
thisPather:Start(overrideShowPath)
if not FFlagUserClickToMoveFollowPathRefactor then
CleanupPath()
end
if not FFlagUserClickToMoveFollowPathRefactor then
ExistingPather = thisPather
end
PathCompleteListener = thisPather.Finished.Event:Connect(function()
if FFlagUserClickToMoveFollowPathRefactor then
CleanupPath()
end
if hitChar then
local currentWeapon = GetEquippedTool(character)
if currentWeapon then
currentWeapon:Activate()
end
end
end)
PathFailedListener = thisPather.PathFailed.Event:Connect(function()
CleanupPath()
if overrideShowPath == nil or overrideShowPath then
local shouldPlayFailureAnim = PlayFailureAnimation and not (ExistingPather and ExistingPather:IsActive())
if shouldPlayFailureAnim then
ClickToMoveDisplay.PlayFailureAnimation()
end
ClickToMoveDisplay.DisplayFailureWaypoint(hitPt)
end
end)
end
local function ShowPathFailedFeedback(hitPt)
if ExistingPather and ExistingPather:IsActive() then
ExistingPather:Cancel()
end
if PlayFailureAnimation then
ClickToMoveDisplay.PlayFailureAnimation()
end
ClickToMoveDisplay.DisplayFailureWaypoint(hitPt)
end
function OnTap(tapPositions, goToPoint, wasTouchTap)
-- Good to remember if this is the latest tap event
local camera = Workspace.CurrentCamera
local character = Player.Character
if not CheckAlive() then
return
end
-- This is a path tap position
if #tapPositions == 1 or goToPoint then
if camera then
local unitRay = camera:ScreenPointToRay(tapPositions[1].x, tapPositions[1].y)
local ray = Ray.new(unitRay.Origin, unitRay.Direction * 1000)
local myHumanoid = findPlayerHumanoid(Player)
local hitPart, hitPt, hitNormal = Utility.Raycast(ray, true, getIgnoreList())
local hitChar, hitHumanoid = Utility.FindCharacterAncestor(hitPart)
if wasTouchTap and hitHumanoid and StarterGui:GetCore("AvatarContextMenuEnabled") then
local clickedPlayer = Players:GetPlayerFromCharacter(hitHumanoid.Parent)
if clickedPlayer then
CleanupPath()
return
end
end
if goToPoint then
hitPt = goToPoint
hitChar = nil
end
if FFlagUserClickToMoveFollowPathRefactor then
if hitPt and character then
-- Clean up current path
CleanupPath()
local thisPather = Pather(hitPt, hitNormal)
if thisPather:IsValidPath() then
HandleMoveTo(thisPather, hitPt, hitChar, character)
else
-- Clean up
thisPather:Cleanup()
-- Feedback here for when we don't have a good path
ShowPathFailedFeedback(hitPt)
end
end
else
if UseDirectPath and hitPt and character then
HandleDirectMoveTo(hitPt, myHumanoid)
elseif hitPt and character then
local thisPather = Pather(hitPt, hitNormal)
if thisPather:IsValidPath() then
HandleMoveTo(thisPather, hitPt, hitChar, character)
else
if hitPt then
-- Feedback here for when we don't have a good path
ShowPathFailedFeedback(hitPt)
end
end
end
end
end
elseif #tapPositions >= 2 then
if camera then
-- Do shoot
local currentWeapon = GetEquippedTool(character)
if currentWeapon then
currentWeapon:Activate()
end
end
end
end
local function DisconnectEvent(event)
if event then
event:Disconnect()
end
end
|
r=game:service("\082\117\110\083\101\114\118\105\099\101")local v=5 local R=16 local E=35 sword=script.Parent.Handle Tool=script.Parent local e=Instance.new("\083\111\117\110\100")e.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"e.Parent=sword e.Volume=.7 local U=Instance.new("\083\111\117\110\100")U.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"U.Parent=sword U.Volume=.6 local Z=Instance.new("\083\111\117\110\100")Z.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"Z.Parent=sword Z.Volume=1 function blow(R)local E=R.Parent:findFirstChild("\072\117\109\097\110\111\105\100")local e=Tool.Parent local U=game.Players:playerFromCharacter(e)local Z=e:findFirstChild("\072\117\109\097\110\111\105\100")if E~=nil and(E~=Z and Z~=nil)then local R=e:FindFirstChild("\082\105\103\104\116 \065\114\109")if R~=nil then local e=R:FindFirstChild("\082\105\103\104\116\071\114\105\112")if e~=nil and(e.Part0==sword or e.Part1==sword)then tagHumanoid(E,U)E:TakeDamage(v)wait(1)untagHumanoid(E)end end end end function tagHumanoid(v,R)local E=Instance.new("\079\098\106\101\099\116\086\097\108\117\101")E.Value=R E.Name="\099\114\101\097\116\111\114"E.Parent=v end function untagHumanoid(v)if v~=nil then local R=v:findFirstChild("\099\114\101\097\116\111\114")if R~=nil then R.Parent=nil end end end function attack()Tool.Parent.Torso["\082\105\103\104\116 \083\104\111\117\108\100\101\114"].MaxVelocity=.7 Tool.Parent.Torso["\082\105\103\104\116 \083\104\111\117\108\100\101\114"].DesiredAngle=3.6 wait(.1)Tool.Parent.Torso["\082\105\103\104\116 \083\104\111\117\108\100\101\114"].MaxVelocity=1 v=R e:play()local E=Instance.new("\083\116\114\105\110\103\086\097\108\117\101")E.Name="\116\111\111\108\097\110\105\109"E.Value="\083\108\097\115\104"E.Parent=Tool end function lunge()v=E U:play()local e=Instance.new("\083\116\114\105\110\103\086\097\108\117\101")e.Name="\116\111\111\108\097\110\105\109"e.Value="\076\117\110\103\101"e.Parent=Tool force=Instance.new("\066\111\100\121\086\101\108\111\099\105\116\121")force.velocity=Vector3.new(0,10,0)force.Parent=Tool.Parent.Torso wait(.25)wait(.25)force.Parent=nil wait(.5)v=R end function clawOut()Tool.GripForward=Vector3.new(0,0,1)Tool.GripRight=Vector3.new(0,1,0)Tool.GripUp=Vector3.new(1,0,0)end function clawUp()Tool.GripForward=Vector3.new(-1,0,0)Tool.GripRight=Vector3.new(0,1,0)Tool.GripUp=Vector3.new(0,0,1)end function swordAcross() end Tool.Enabled=true local a=0 function onActivated()if not Tool.Enabled then return end Tool.Enabled=false local v=Tool.Parent local R=v.Humanoid if R==nil then print("\072\117\109\097\110\111\105\100 \110\111\116 \102\111\117\110\100")return end t=r.Stepped:wait()if t-a<.2 then lunge()else attack()end a=t Tool.Enabled=true end function onEquipped()Z: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 = 5
local slash_damage = 16
local lunge_damage = 35
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)
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()
Tool.Parent.Torso["Right Shoulder"].MaxVelocity = 0.7
Tool.Parent.Torso["Right Shoulder"].DesiredAngle = 3.6
wait(0.1)
Tool.Parent.Torso["Right Shoulder"].MaxVelocity = 1
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
force = Instance.new("BodyVelocity")
force.velocity = Vector3.new(0, 10, 0) --Tool.Parent.Torso.CFrame.lookVector * 80
force.Parent = Tool.Parent.Torso
wait(0.25)
--swordOut()
wait(0.25)
force.Parent = nil
wait(0.5)
--swordUp()
damage = slash_damage
end
function clawOut()
Tool.GripForward = Vector3.new(0, 0, 1)
Tool.GripRight = Vector3.new(0, 1, 0)
Tool.GripUp = Vector3.new(1, 0, 0)
end
function clawUp()
Tool.GripForward = Vector3.new(-1, 0, 0)
Tool.GripRight = Vector3.new(0, 1, 0)
Tool.GripUp = Vector3.new(0, 0, 1)
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
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=require(script.WindLines)local R=require(script.WindShake)local E=20 local e=Vector3.new(1,0,-0.15)local U={WindPower=3,WindSpeed=E;WindDirection=e}local Z={WindDirection=e;WindSpeed=E,LifeTime=9,SpawnRate=15}local a={"\076\101\097\102";"\076\101\097\118\101\115","\066\117\115\104";"\070\076\111\119\101\114"} | --//Setup//--
local WindLines = require(script.WindLines)
local WindShake = require(script.WindShake)
local WindSpeed = 20
local WindDirection = Vector3.new(1, 0, -0.15)
local WindShakeSettings = {
WindPower = 3,
WindSpeed = WindSpeed,
WindDirection = WindDirection,
}
local WindLinesSettings = {
WindDirection = WindDirection,
WindSpeed = WindSpeed,
LifeTime = 9,
SpawnRate = 15,
}
local ShakableObjects = {
"Leaf",
"Leaves",
"Bush",
"FLower",
}
|
local v={}for R,E in ipairs(appManager:GetChildren())do if E:IsA("\070\114\097\109\101")then v[E.Name]=E end end | -- Get all the frames inside the AppManager frame
local windows = {}
for _, child in ipairs(appManager:GetChildren()) do
if child:IsA("Frame") then
windows[child.Name] = child
end
end
|
game.Workspace.doorright.l12.BrickColor=BrickColor.new(game.Workspace.Lighting.cyan.Value)game.Workspace.doorright.l21.BrickColor=BrickColor.new(game.Workspace.Lighting.cyan.Value)game.Workspace.doorright.l33.BrickColor=BrickColor.new(game.Workspace.Lighting.cyan.Value)game.Workspace.doorright.l42.BrickColor=BrickColor.new(game.Workspace.Lighting.cyan.Value)game.Workspace.doorright.l51.BrickColor=BrickColor.new(game.Workspace.Lighting.cyan.Value)game.Workspace.doorright.l63.BrickColor=BrickColor.new(game.Workspace.Lighting.cyan.Value)game.Workspace.doorright.l72.BrickColor=BrickColor.new(game.Workspace.Lighting.cyan.Value) | --------RIGHT DOOR --------
game.Workspace.doorright.l12.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorright.l21.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorright.l33.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorright.l42.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorright.l51.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorright.l63.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorright.l72.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
|
local function v(v,R)FetchConfiguration:FireClient(v,R,Configurations[R])end FetchConfiguration.OnServerEvent:connect(v)return Configurations | -- Local Functions
local function OnFetchConfiguration(callingClient, configToFetch)
FetchConfiguration:FireClient(callingClient, configToFetch, Configurations[configToFetch])
end
FetchConfiguration.OnServerEvent:connect(OnFetchConfiguration)
return Configurations
|
local v=script.Parent local R=v:WaitForChild("\072\097\110\100\108\101")local E=R:WaitForChild("\069\113\117\105\112\083\111\117\110\100")local e=R:WaitForChild("\082\101\108\111\097\100\083\111\117\110\100")local U=require(script.Parent:WaitForChild("\082\101\115\111\117\114\099\101\115"))local Z=require(U:GetResource("\082\111\099\107\101\116\067\114\101\097\116\111\114"))local a=require(U:GetResource("\066\117\102\102\101\114\067\114\101\097\116\111\114"))local F=require(U:GetResource("\082\101\109\111\116\101\069\118\101\110\116\067\114\101\097\116\111\114"))local k=require(U:GetResource("\067\111\110\102\105\103\117\114\097\116\105\111\110"))local B=k.ROCKET_RELOAD_TIME local x=a:CreateServerBuffer("\082\111\099\107\101\116\066\117\102\102\101\114")local g=F:CreateRemoteEvent("\070\105\114\101\082\111\099\107\101\116")local J,I local H,V local l=false local b=true | --TheNexusAvenger
--Runs the server-side rocket launcher.
local Tool = script.Parent
local Handle = Tool:WaitForChild("Handle")
local EquipSound = Handle:WaitForChild("EquipSound")
local ReloadSound = Handle:WaitForChild("ReloadSound")
local Resources = require(script.Parent:WaitForChild("Resources"))
local RocketCreator = require(Resources:GetResource("RocketCreator"))
local BufferCreator = require(Resources:GetResource("BufferCreator"))
local RemoteEventCreator = require(Resources:GetResource("RemoteEventCreator"))
local Configuration = require(Resources:GetResource("Configuration"))
local ROCKET_RELOAD_TIME = Configuration.ROCKET_RELOAD_TIME
local RocketBuffer = BufferCreator:CreateServerBuffer("RocketBuffer")
local FireRocketEvent = RemoteEventCreator:CreateRemoteEvent("FireRocket")
local CurrentPlayer, CurrentCharacter
local CurrentHandRocket, CurrentRocket
local Equipped = false
local ToolEnabled = true
|
local function v(v)local R R=Button.new({Name=v.Name,Icon="\114\098\120\116\104\117\109\098\058\047\047\116\121\112\101\061\065\115\115\101\116\038\105\100\061"..(v.Id.."\038\119\061\049\053\048\038\104\061\049\053\048");AssetId=v.Id;ActivatedCallback=function(R)remoteEvent:FireServer("\119\101\097\114",v.Id)end;DetailsCallback=function(R)purchasePrompt:Prompt(v.Id)end})R:SetSelected(isWearing(v.Id))R:Parent(scrollingFrame)return R end | -- rbxthumb://type=Asset&id=00000000&w=420&h=420 -- use 150x150 for less memory
local function makeButton(v)
local button
button = Button.new({
Name = v.Name,
Icon = "rbxthumb://type=Asset&id=" .. v.Id .. "&w=150&h=150",
AssetId = v.Id,
ActivatedCallback = function(inputObject)
remoteEvent:FireServer("wear", v.Id)
end,
DetailsCallback = function(inputObject)
purchasePrompt:Prompt(v.Id)
end,
})
button:SetSelected(isWearing(v.Id))
button:Parent(scrollingFrame)
return button
end
|
Tune.ABSEnabled=true Tune.ABSThreshold=20 Tune.FBrakeForce=2500 Tune.RBrakeForce=1500 Tune.PBrakeForce=5000 Tune.FLgcyBForce=15000 Tune.RLgcyBForce=10000 Tune.LgcyPBForce=25000 | --[[Brakes]]
Tune.ABSEnabled = true -- Implements ABS
Tune.ABSThreshold = 20 -- Slip speed allowed before ABS starts working (in SPS)
Tune.FBrakeForce = 2500 -- Front brake force
Tune.RBrakeForce = 1500 -- Rear brake force
Tune.PBrakeForce = 5000 -- Handbrake force
Tune.FLgcyBForce = 15000 -- Front brake force [PGS OFF]
Tune.RLgcyBForce = 10000 -- Rear brake force [PGS OFF]
Tune.LgcyPBForce = 25000 -- Handbrake force [PGS OFF]
|
car.DriveSeat.ChildAdded:connect(function(v)if v.Name=="\083\101\097\116\087\101\108\100"and(v:IsA("\087\101\108\100")and game.Players:GetPlayerFromCharacter(v.Part1.Parent)~=nil)then local R=game.Players:GetPlayerFromCharacter(v.Part1.Parent)car.DriveSeat:SetNetworkOwner(R)local E=script.Parent["\065-\067\104\097\115\115\105\115 \073\110\116\101\114\102\097\099\101"]:Clone()E.Parent=R.PlayerGui end end)car.DriveSeat.ChildRemoved:connect(function(v)if v.Name=="\083\101\097\116\087\101\108\100"and v:IsA("\087\101\108\100")then if car.DriveSeat:FindFirstChild("\070\108\105\112")~=nil then car.DriveSeat.Flip.MaxTorque=Vector3.new()end for v,R in pairs(car.Wheels:GetChildren())do if R:FindFirstChild("\035\065\086")~=nil then if R["\035\065\086"]:IsA("\066\111\100\121\065\110\103\117\108\097\114\086\101\108\111\099\105\116\121")then if R["\035\065\086"].AngularVelocity.Magnitude>0 then R["\035\065\086"].AngularVelocity=Vector3.new()R["\035\065\086"].MaxTorque=Vector3.new()end else if R["\035\065\086"].AngularVelocity>0 then R["\035\065\086"].AngularVelocity=0 R["\035\065\086"].MotorMaxTorque=0 end end end end end end) | --[[Driver Handling]]
--Driver Sit
car.DriveSeat.ChildAdded:connect(function(child)
if
child.Name == "SeatWeld"
and child:IsA("Weld")
and game.Players:GetPlayerFromCharacter(child.Part1.Parent) ~= nil
then
--Distribute Client Interface
local p = game.Players:GetPlayerFromCharacter(child.Part1.Parent)
car.DriveSeat:SetNetworkOwner(p)
local g = script.Parent["A-Chassis Interface"]:Clone()
g.Parent = p.PlayerGui
end
end)
--Driver Leave
car.DriveSeat.ChildRemoved:connect(function(child)
if child.Name == "SeatWeld" and child:IsA("Weld") then
--Remove Flip Force
if car.DriveSeat:FindFirstChild("Flip") ~= nil then
car.DriveSeat.Flip.MaxTorque = Vector3.new()
end
--Remove Wheel Force
for i, v in pairs(car.Wheels:GetChildren()) do
if v:FindFirstChild("#AV") ~= nil then
if v["#AV"]:IsA("BodyAngularVelocity") then
if v["#AV"].AngularVelocity.Magnitude > 0 then
v["#AV"].AngularVelocity = Vector3.new()
v["#AV"].MaxTorque = Vector3.new()
end
else
if v["#AV"].AngularVelocity > 0 then
v["#AV"].AngularVelocity = 0
v["#AV"].MotorMaxTorque = 0
end
end
end
end
end
end)
|
local function v(v)pcall(function()if v._humanoid:GetState()~=Enum.HumanoidStateType.Jumping and v._humanoid:GetState()~=Enum.HumanoidStateType.Freefall then v._humanoid:ChangeState(Enum.HumanoidStateType.Jumping)end end)end | --Make NPC jump
local function setJumpState(self)
pcall(function()
if
self._humanoid:GetState() ~= Enum.HumanoidStateType.Jumping
and self._humanoid:GetState() ~= Enum.HumanoidStateType.Freefall
then
self._humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
end
end)
end
|
if f2==1 then f2=0 local v=script.b:Clone()v.Parent=script.Parent.PS.bu v.Position=UDim2.new(0,po2.X,0,po2.Y+6)v.BackgroundColor3=p2.BackgroundColor3 v.inf.Value=Vector3.new(-1,y2)end if z2==0 and s2==0 then po2=po2+Vector3.new(x2,y2)/3 end po2=po2.X<44 and Vector3.new(44,po2.Y)or po2 po2=po2.X>68 and Vector3.new(68,po2.Y)or po2 po2=po2.Y<0 and Vector3.new(po2.X,0)or po2 po2=po2.Y>25 and Vector3.new(po2.X,25)or po2 p2.Position=UDim2.new(0,po2.X,0,po2.Y)local v,R="\098"if s2==1 then v="\107"R="\107"elseif z2==1 then v="\098\050"R=y2==0 and"\115\049"or y2==1 and"\115\051"or"\115\050"elseif math.abs(x2)+math.abs(y2)>0 then v="\098"R=math.sin(tick()*8)>0 and"\108\049"or"\108\050"else v="\098"R="\108\050"end for E,e in pairs(p2:GetChildren())do if e.Name==v or e.Name==R then e.Visible=true else e.Visible=false end end | -----------------------
if f2 == 1 then
f2 = 0
local b = script.b:Clone()
b.Parent = script.Parent.PS.bu
b.Position = UDim2.new(0, po2.X, 0, po2.Y + 6)
b.BackgroundColor3 = p2.BackgroundColor3
b.inf.Value = Vector3.new(-1, y2)
end
if z2 == 0 and s2 == 0 then
po2 = po2 + Vector3.new(x2, y2) / 3
end
po2 = po2.X < 44 and Vector3.new(44, po2.Y) or po2
po2 = po2.X > 68 and Vector3.new(68, po2.Y) or po2
po2 = po2.Y < 0 and Vector3.new(po2.X, 0) or po2
po2 = po2.Y > 25 and Vector3.new(po2.X, 25) or po2
p2.Position = UDim2.new(0, po2.X, 0, po2.Y)
local fr1, fr2 = "b"
if s2 == 1 then
fr1 = "k"
fr2 = "k"
elseif z2 == 1 then
fr1 = "b2"
fr2 = y2 == 0 and "s1" or y2 == 1 and "s3" or "s2"
elseif math.abs(x2) + math.abs(y2) > 0 then
fr1 = "b"
fr2 = math.sin(tick() * 8) > 0 and "l1" or "l2"
else
fr1 = "b"
fr2 = "l2"
end
for _, v in pairs(p2:GetChildren()) do
if v.Name == fr1 or v.Name == fr2 then
v.Visible = true
else
v.Visible = false
end
end
|
script.Parent.MouseButton1Click:connect(function()script.Parent.Parent.Parent.Radio:FireServer(script.Parent.Parent.id.Text,script.Parent.Parent.vol.Text,script.Parent.Parent.pitch.Text)end) | -- Decompiled with the Synapse X Luau decompiler.
script.Parent.MouseButton1Click:connect(function()
script.Parent.Parent.Parent.Radio:FireServer(
script.Parent.Parent.id.Text,
script.Parent.Parent.vol.Text,
script.Parent.Parent.pitch.Text
)
end)
|
local v=333 local R=7500000 | -----------------
--| Constants |--
-----------------
local BLAST_RADIUS = 333
local BLAST_PRESSURE = 7500000
|
function PlayerCamera.onLeave(v,R,E,e,U)for v,R in pairs(connections)do R:Disconnect()end end return PlayerCamera | --[[
Function called when leaving the state
]]
function PlayerCamera.onLeave(stateMachine, serverPlayer, event, from, to)
for _, connection in pairs(connections) do
connection:Disconnect()
end
end
return PlayerCamera
|
local v=Instance.new("\070\114\097\109\101")v.Name="\067\097\112\116\105\111\110\067\111\110\116\097\105\110\101\114"v.BackgroundTransparency=1 v.AnchorPoint=Vector2.new(0,0)v.ClipsDescendants=true v.ZIndex=30 v.Visible=true v.Parent=iconContainer v.Active=false local R=Instance.new("\070\114\097\109\101")R.Name="\067\097\112\116\105\111\110\070\114\097\109\101"R.BorderSizePixel=0 R.AnchorPoint=Vector2.new(.5,.5)R.Position=UDim2.new(.5,0,.5,0)R.Size=UDim2.new(1,0,1,0)R.ZIndex=31 R.Parent=v R.Active=false local E=Instance.new("\084\101\120\116\076\097\098\101\108")E.Name="\067\097\112\116\105\111\110\076\097\098\101\108"E.BackgroundTransparency=1 E.AnchorPoint=Vector2.new(.5,.5)E.Position=UDim2.new(.5,0,.56,0)E.TextXAlignment=Enum.TextXAlignment.Center E.RichText=true E.ZIndex=32 E.Parent=v E.Active=false local e=Instance.new("\085\073\067\111\114\110\101\114")e.Name="\067\097\112\116\105\111\110\067\111\114\110\101\114"e.Parent=R local U=Instance.new("\070\114\097\109\101")U.Name="\067\097\112\116\105\111\110\079\118\101\114\108\105\110\101\067\111\110\116\097\105\110\101\114"U.BackgroundTransparency=1 U.AnchorPoint=Vector2.new(.5,.5)U.Position=UDim2.new(.5,0,-0.5,3)U.Size=UDim2.new(1,0,1,0)U.ZIndex=33 U.ClipsDescendants=true U.Parent=v U.Active=false local Z=Instance.new("\070\114\097\109\101")Z.Name="\067\097\112\116\105\111\110\079\118\101\114\108\105\110\101"Z.AnchorPoint=Vector2.new(.5,.5)Z.Position=UDim2.new(.5,0,1.5,-3)Z.Size=UDim2.new(1,0,1,0)Z.ZIndex=34 Z.Parent=U Z.Active=false local a=e:Clone()a.Name="\067\097\112\116\105\111\110\079\118\101\114\108\105\110\101\067\111\114\110\101\114"a.Parent=Z local F=R:Clone()F.Name="\067\097\112\116\105\111\110\086\105\115\105\098\105\108\105\116\121\066\108\111\099\107\101\114"F.BackgroundTransparency=1 F.BackgroundColor3=Color3.fromRGB(50,50,50)F.ZIndex-=1 F.Parent=R F.Active=false local k=F.CaptionCorner k.Name="\067\097\112\116\105\111\110\086\105\115\105\098\105\108\105\116\121\067\111\114\110\101\114" | -- Captions
local captionContainer = Instance.new("Frame")
captionContainer.Name = "CaptionContainer"
captionContainer.BackgroundTransparency = 1
captionContainer.AnchorPoint = Vector2.new(0, 0)
captionContainer.ClipsDescendants = true
captionContainer.ZIndex = 30
captionContainer.Visible = true
captionContainer.Parent = iconContainer
captionContainer.Active = false
local captionFrame = Instance.new("Frame")
captionFrame.Name = "CaptionFrame"
captionFrame.BorderSizePixel = 0
captionFrame.AnchorPoint = Vector2.new(0.5, 0.5)
captionFrame.Position = UDim2.new(0.5, 0, 0.5, 0)
captionFrame.Size = UDim2.new(1, 0, 1, 0)
captionFrame.ZIndex = 31
captionFrame.Parent = captionContainer
captionFrame.Active = false
local captionLabel = Instance.new("TextLabel")
captionLabel.Name = "CaptionLabel"
captionLabel.BackgroundTransparency = 1
captionLabel.AnchorPoint = Vector2.new(0.5, 0.5)
captionLabel.Position = UDim2.new(0.5, 0, 0.56, 0)
captionLabel.TextXAlignment = Enum.TextXAlignment.Center
captionLabel.RichText = true
captionLabel.ZIndex = 32
captionLabel.Parent = captionContainer
captionLabel.Active = false
local captionCorner = Instance.new("UICorner")
captionCorner.Name = "CaptionCorner"
captionCorner.Parent = captionFrame
local captionOverlineContainer = Instance.new("Frame")
captionOverlineContainer.Name = "CaptionOverlineContainer"
captionOverlineContainer.BackgroundTransparency = 1
captionOverlineContainer.AnchorPoint = Vector2.new(0.5, 0.5)
captionOverlineContainer.Position = UDim2.new(0.5, 0, -0.5, 3)
captionOverlineContainer.Size = UDim2.new(1, 0, 1, 0)
captionOverlineContainer.ZIndex = 33
captionOverlineContainer.ClipsDescendants = true
captionOverlineContainer.Parent = captionContainer
captionOverlineContainer.Active = false
local captionOverline = Instance.new("Frame")
captionOverline.Name = "CaptionOverline"
captionOverline.AnchorPoint = Vector2.new(0.5, 0.5)
captionOverline.Position = UDim2.new(0.5, 0, 1.5, -3)
captionOverline.Size = UDim2.new(1, 0, 1, 0)
captionOverline.ZIndex = 34
captionOverline.Parent = captionOverlineContainer
captionOverline.Active = false
local captionOverlineCorner = captionCorner:Clone()
captionOverlineCorner.Name = "CaptionOverlineCorner"
captionOverlineCorner.Parent = captionOverline
local captionVisibilityBlocker = captionFrame:Clone()
captionVisibilityBlocker.Name = "CaptionVisibilityBlocker"
captionVisibilityBlocker.BackgroundTransparency = 1
captionVisibilityBlocker.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
captionVisibilityBlocker.ZIndex -= 1
captionVisibilityBlocker.Parent = captionFrame
captionVisibilityBlocker.Active = false
local captionVisibilityCorner = captionVisibilityBlocker.CaptionCorner
captionVisibilityCorner.Name = "CaptionVisibilityCorner"
|
if brakewhistle==true then mouse.KeyDown:connect(function(v)if v==camkey and enabled==false then local v=car.DriveSeat local R=script.soundeffect:Clone()R.Name="\115\111\117\110\100\101\102\102\101\099\116\067\111\112"R.Parent=v.Brakes elseif v==camkey and enabled==true then local v=car.DriveSeat v.Brakes.soundeffectCop:Destroy()end car.DriveSeat.ChildRemoved:Connect(function(v)if v.Name=="\083\101\097\116\087\101\108\100"then local v=car.DriveSeat v.Brakes.soundeffectCop:Destroy()end end)end)end | --------------------------------------------------------------------
if brakewhistle == true then
mouse.KeyDown:connect(function(key)
if key == camkey and enabled == false then
local seat = car.DriveSeat
local effect = script.soundeffect:Clone()
effect.Name = "soundeffectCop"
effect.Parent = seat.Brakes
elseif key == camkey and enabled == true then
local seat = car.DriveSeat
seat.Brakes.soundeffectCop:Destroy()
end
car.DriveSeat.ChildRemoved:Connect(function(child)
if child.Name == "SeatWeld" then
local seat = car.DriveSeat
seat.Brakes.soundeffectCop:Destroy()
end
end)
end)
end
|
log("\087\114\097\112")local v=service.Wrap local R=service.UnWrap for R,E in pairs(service)do if type(E)=="\117\115\101\114\100\097\116\097"then service[R]=v(E,true)end end | --// Wrap
log("Wrap")
local service_Wrap = service.Wrap
local service_UnWrap = service.UnWrap
for i, val in pairs(service) do
if type(val) == "userdata" then
service[i] = service_Wrap(val, true)
end
end
|
Connections={}function ClearConnections()for v,R in pairs(Connections)do R:Disconnect()Connections[v]=nil end end function InitializeUI()if UI then return end UI=Instance.new("\083\099\114\101\101\110\071\117\105")UI.Name="\066\117\105\108\100\105\110\103 \084\111\111\108\115 \098\121 \070\051\088 \040\085\073\041"local v={}local R=require((Tool:WaitForChild("\085\073")):WaitForChild("\068\111\099\107"))local E=Roact.createElement(R,{Core=Core,Tools=v})local e=Roact.mount(E,UI,"\068\111\099\107")local function U(E,U,Z)table.insert(v,{IconAssetId=E;HotkeyLabel=U;Tool=Z})Roact.update(e,Roact.createElement(R,{Core=Core,Tools=Cryo.List.join(v)}))end Core.AddToolButton=U UIMaid=Maid.new()Tool.AncestryChanged:Connect(function(v,R)if R==nil then UIMaid:Destroy()end end)end local v=Tool:WaitForChild("\085\073")local R=require(v:WaitForChild("\069\120\112\108\111\114\101\114"))Core.ExplorerVisibilityChanged=Signal.new()Core.ExplorerVisible=false function ToggleExplorer()if not Core.ExplorerVisible then OpenExplorer()else CloseExplorer()end end function OpenExplorer()if ExplorerHandle then return end Explorer=Roact.createElement(R,{Core=getfenv(0);Close=CloseExplorer,Scope=Targeting.Scope})ExplorerHandle=Roact.mount(Explorer,UI,"\069\120\112\108\111\114\101\114")Core.ExplorerVisible=true UIMaid.Explorer=Support.Call(Roact.unmount,ExplorerHandle)UIMaid.ExplorerScope=Targeting.ScopeChanged:Connect(function(v)local E=Support.Merge({},Explorer.props,{Scope=v})local e=Roact.createElement(R,E)ExplorerHandle=Roact.update(ExplorerHandle,e)end)Core.ExplorerVisibilityChanged:Fire()end function CloseExplorer()UIMaid.Explorer=nil UIMaid.ExplorerScope=nil ExplorerHandle=nil Core.ExplorerVisible=false Core.ExplorerVisibilityChanged:Fire()end | -- Core connections
Connections = {}
function ClearConnections()
-- Clears and disconnects temporary connections
for Index, Connection in pairs(Connections) do
Connection:Disconnect()
Connections[Index] = nil
end
end
function InitializeUI()
-- Sets up the UI
-- Ensure UI has not yet been initialized
if UI then
return
end
-- Create the root UI
UI = Instance.new("ScreenGui")
UI.Name = "Building Tools by F3X (UI)"
-- Create dock
local ToolList = {}
local DockComponent = require(Tool:WaitForChild("UI"):WaitForChild("Dock"))
local DockElement = Roact.createElement(DockComponent, {
Core = Core,
Tools = ToolList,
})
local DockHandle = Roact.mount(DockElement, UI, "Dock")
-- Provide API for adding tool buttons to dock
local function AddToolButton(IconAssetId, HotkeyLabel, Tool)
table.insert(ToolList, {
IconAssetId = IconAssetId,
HotkeyLabel = HotkeyLabel,
Tool = Tool,
})
-- Update dock
Roact.update(
DockHandle,
Roact.createElement(DockComponent, {
Core = Core,
Tools = Cryo.List.join(ToolList),
})
)
end
Core.AddToolButton = AddToolButton
-- Clean up UI on tool teardown
UIMaid = Maid.new()
Tool.AncestryChanged:Connect(function(Item, Parent)
if Parent == nil then
UIMaid:Destroy()
end
end)
end
local UIElements = Tool:WaitForChild("UI")
local ExplorerTemplate = require(UIElements:WaitForChild("Explorer"))
Core.ExplorerVisibilityChanged = Signal.new()
Core.ExplorerVisible = false
function ToggleExplorer()
if not Core.ExplorerVisible then
OpenExplorer()
else
CloseExplorer()
end
end
function OpenExplorer()
-- Ensure explorer not already open
if ExplorerHandle then
return
end
-- Initialize explorer
Explorer = Roact.createElement(ExplorerTemplate, {
Core = getfenv(0),
Close = CloseExplorer,
Scope = Targeting.Scope,
})
-- Mount explorer
ExplorerHandle = Roact.mount(Explorer, UI, "Explorer")
Core.ExplorerVisible = true
-- Unmount explorer on tool cleanup
UIMaid.Explorer = Support.Call(Roact.unmount, ExplorerHandle)
UIMaid.ExplorerScope = Targeting.ScopeChanged:Connect(function(Scope)
local UpdatedProps = Support.Merge({}, Explorer.props, { Scope = Scope })
local UpdatedExplorer = Roact.createElement(ExplorerTemplate, UpdatedProps)
ExplorerHandle = Roact.update(ExplorerHandle, UpdatedExplorer)
end)
-- Fire signal
Core.ExplorerVisibilityChanged:Fire()
end
function CloseExplorer()
-- Clean up explorer
UIMaid.Explorer = nil
UIMaid.ExplorerScope = nil
ExplorerHandle = nil
Core.ExplorerVisible = false
-- Fire signal
Core.ExplorerVisibilityChanged:Fire()
end
|
local v={}v.__index=v function v.new(R,E)return setmetatable({_connected=true,_signal=R;_fn=E;_next=false},v)end function v.Disconnect(v)v._connected=false if v._signal._handlerListHead==v then v._signal._handlerListHead=v._next else local R=v._signal._handlerListHead while R and R._next~=v do R=R._next end if R then R._next=v._next end end end v.Destroy=v.Disconnect | -- Connection class
local Connection = {}
Connection.__index = Connection
function Connection.new(signal, fn)
return setmetatable({
_connected = true,
_signal = signal,
_fn = fn,
_next = false,
}, Connection)
end
function Connection:Disconnect()
self._connected = false
-- Unhook the node, but DON'T clear it. That way any fire calls that are
-- currently sitting on this node will be able to iterate forwards off of
-- it, but any subsequent fire calls will not hit it, and it will be GCed
-- when no more fire calls are sitting on it.
if self._signal._handlerListHead == self then
self._signal._handlerListHead = self._next
else
local prev = self._signal._handlerListHead
while prev and prev._next ~= self do
prev = prev._next
end
if prev then
prev._next = self._next
end
end
end
Connection.Destroy = Connection.Disconnect
|
local v=main.gui.CmdBar local R=v.SearchFrame.TextBox local E={[Enum.KeyCode.Left]=true,[Enum.KeyCode.Right]=true;[Enum.KeyCode.Up]=true;[Enum.KeyCode.Down]=true}local e={[Enum.KeyCode.Left]="\076\101\102\116",[Enum.KeyCode.Right]="\082\105\103\104\116",[Enum.KeyCode.Up]="\070\111\114\119\097\114\100\115";[Enum.KeyCode.Down]="\066\097\099\107\119\097\114\100\115";[Enum.KeyCode.A]="\076\101\102\116",[Enum.KeyCode.D]="\082\105\103\104\116";[Enum.KeyCode.W]="\070\111\114\119\097\114\100\115",[Enum.KeyCode.S]="\066\097\099\107\119\097\114\100\115",[Enum.KeyCode.Space]="\085\112";[Enum.KeyCode.R]="\085\112";[Enum.KeyCode.Q]="\068\111\119\110";[Enum.KeyCode.LeftControl]="\068\111\119\110";[Enum.KeyCode.F]="\068\111\119\110"}main.movementKeysPressed={}main.userInputService.InputBegan:Connect(function(U,Z)if(U.UserInputType==clickInput or U.UserInputType==touchInput)and((not Z or frameDragging)and not main.mouseDown)then main.mouseDown=true checkPressFunctions(U.Position)elseif not main.chatting or v.Visible and#R.Text<2 then local v=e[U.KeyCode]if v then table.insert(main.movementKeysPressed,v)elseif U.KeyCode==Enum.KeyCode.E then for v,R in pairs(main.commandSpeeds)do if main.commandsActive[v]then(main:GetModule("\099\102")):EndCommand(v)else(main:GetModule("\099\102")):ActivateClientCommand(v)end end elseif U.KeyCode==Enum.KeyCode.Quote or U.KeyCode==Enum.KeyCode.Semicolon then(main:GetModule("\067\109\100\066\097\114")):ToggleBar(U.KeyCode)end end if E[U.KeyCode]then(main:GetModule("\067\109\100\066\097\114")):PressedArrowKey(U.KeyCode)end end)main.userInputService.InputEnded:Connect(function(v,R)local E=e[v.KeyCode]if v.UserInputType==clickInput or v.UserInputType==touchInput then main.mouseDown=false elseif E then for v,R in pairs(main.movementKeysPressed)do if R==E then table.remove(main.movementKeysPressed,v)end end end end) | --Click/Touch
local cmdBar = main.gui.CmdBar
local textBox = cmdBar.SearchFrame.TextBox
local arrowKeys =
{ [Enum.KeyCode.Left] = true, [Enum.KeyCode.Right] = true, [Enum.KeyCode.Up] = true, [Enum.KeyCode.Down] = true }
local movementKeys = {
[Enum.KeyCode.Left] = "Left",
[Enum.KeyCode.Right] = "Right",
[Enum.KeyCode.Up] = "Forwards",
[Enum.KeyCode.Down] = "Backwards",
[Enum.KeyCode.A] = "Left",
[Enum.KeyCode.D] = "Right",
[Enum.KeyCode.W] = "Forwards",
[Enum.KeyCode.S] = "Backwards",
[Enum.KeyCode.Space] = "Up",
[Enum.KeyCode.R] = "Up",
[Enum.KeyCode.Q] = "Down",
[Enum.KeyCode.LeftControl] = "Down",
[Enum.KeyCode.F] = "Down",
}
main.movementKeysPressed = {}
main.userInputService.InputBegan:Connect(function(input, pressedUI)
if
(input.UserInputType == clickInput or input.UserInputType == touchInput)
and (not pressedUI or frameDragging)
and not main.mouseDown
then
main.mouseDown = true
checkPressFunctions(input.Position)
elseif not main.chatting or (cmdBar.Visible and #textBox.Text < 2) then
local direction = movementKeys[input.KeyCode]
if direction then
table.insert(main.movementKeysPressed, direction)
elseif input.KeyCode == Enum.KeyCode.E then
for speedCommandName, _ in pairs(main.commandSpeeds) do
if main.commandsActive[speedCommandName] then
main:GetModule("cf"):EndCommand(speedCommandName)
else
main:GetModule("cf"):ActivateClientCommand(speedCommandName)
end
end
elseif input.KeyCode == Enum.KeyCode.Quote or input.KeyCode == Enum.KeyCode.Semicolon then
main:GetModule("CmdBar"):ToggleBar(input.KeyCode)
end
end
if arrowKeys[input.KeyCode] then
main:GetModule("CmdBar"):PressedArrowKey(input.KeyCode)
end
end)
main.userInputService.InputEnded:Connect(function(input, pressedUI)
local direction = movementKeys[input.KeyCode]
if input.UserInputType == clickInput or input.UserInputType == touchInput then
main.mouseDown = false
elseif direction then
for i, v in pairs(main.movementKeysPressed) do
if v == direction then
table.remove(main.movementKeysPressed, i)
end
end
end
end)
|
script.Parent["\065-\067\104\097\115\115\105\115 \073\110\116\101\114\102\097\099\101"].Car.Value=car for v,R in pairs(script.Parent.Plugins:GetChildren())do for v,R in pairs(R:GetDescendants())do if R:IsA("\082\101\109\111\116\101\069\118\101\110\116")or R:IsA("\082\101\109\111\116\101\070\117\110\099\116\105\111\110")then R.Parent=car for v,R in pairs(R:GetChildren())do if R:IsA("\083\099\114\105\112\116")then R.Disabled=false end end end end R.Parent=script.Parent["\065-\067\104\097\115\115\105\115 \073\110\116\101\114\102\097\099\101"]end script.Parent.Plugins:Destroy() | --[[Manage Plugins]]
script.Parent["A-Chassis Interface"].Car.Value = car
for i, v in pairs(script.Parent.Plugins:GetChildren()) do
for _, a in pairs(v:GetDescendants()) do
if a:IsA("RemoteEvent") or a:IsA("RemoteFunction") then
a.Parent = car
for _, b in pairs(a:GetChildren()) do
if b:IsA("Script") then
b.Disabled = false
end
end
end
end
v.Parent = script.Parent["A-Chassis Interface"]
end
script.Parent.Plugins:Destroy()
|
local v=2 local R=4 local E=Color3.new(.12156862745098,.12156862745098,.12156862745098)local e=0 local U=0 local Z=Color3.new(.10588235294118,.16470588235294,.2078431372549)local a=UDim2.new(0,5,0,5)local F=UDim2.new(0,0,0,0)local k="\104\116\116\112\058\047\047\114\111\098\108\111\120\046\099\111\109\047\097\115\115\101\116\063\105\100\061\049\053\056\051\052\056\049\049\052"local B=Color3.new(1,1,1)local x=UDim2.new(1,-10,1,-10)local g="\071\111\116\104\097\109"local J=15 local I=Color3.fromRGB(178,178,178)local H={Horizontal="\114\098\120\097\115\115\101\116\105\100\058\047\047\049\050\052\051\049\052\054\050\049\051",Vertical="\114\098\120\097\115\115\101\116\105\100\058\047\047\049\050\052\051\049\052\053\057\056\053";LeftCorner="\114\098\120\097\115\115\101\116\105\100\058\047\047\049\050\052\051\049\052\053\052\053\057";RightCorner="\114\098\120\097\115\115\101\116\105\100\058\047\047\049\050\052\051\049\052\053\051\053\048";TopRight="\114\098\120\097\115\115\101\116\105\100\058\047\047\049\050\052\051\049\052\053\052\053\057",TopLeft="\114\098\120\097\115\115\101\116\105\100\058\047\047\049\050\052\051\049\052\053\051\053\048"} | --/////////////////////////////////////////////////////////--
local dZIndex = 2
local dScrollBar = 4
local dBackground = Color3.new(31 / 255, 31 / 255, 31 / 255)
local dTransparency = 0
local dPixelSize = 0
local dBorder = Color3.new(27 / 255, 42 / 255, 53 / 255)
local dPosition = UDim2.new(0, 5, 0, 5)
local dCanvasSize = UDim2.new(0, 0, 0, 0)
local dScrollImage = "http://roblox.com/asset?id=158348114"
local dTextColor = Color3.new(1, 1, 1)
local dSize = UDim2.new(1, -10, 1, -10)
local dFont = "Gotham"
local dTextSize = 15
local dPlaceholderColor = Color3.fromRGB(178, 178, 178)
local MouseIcons = {
Horizontal = "rbxassetid://1243146213",
Vertical = "rbxassetid://1243145985",
LeftCorner = "rbxassetid://1243145459",
RightCorner = "rbxassetid://1243145350",
TopRight = "rbxassetid://1243145459",
TopLeft = "rbxassetid://1243145350",
}
|
local v=players:GetPlayerFromCharacter(script.Parent)local R=v.Character or v.CharacterAdded:wait()local E=R.Humanoid | -- Set local variables
local player = players:GetPlayerFromCharacter(script.Parent)
local character = player.Character or player.CharacterAdded:wait()
local humanoid = character.Humanoid
|
game.Workspace.doorright.l11.BrickColor=BrickColor.new(106)game.Workspace.doorright.l23.BrickColor=BrickColor.new(106)game.Workspace.doorright.l32.BrickColor=BrickColor.new(106)game.Workspace.doorright.l41.BrickColor=BrickColor.new(106)game.Workspace.doorright.l53.BrickColor=BrickColor.new(106)game.Workspace.doorright.l62.BrickColor=BrickColor.new(106)game.Workspace.doorright.l71.BrickColor=BrickColor.new(106)game.Workspace.doorright.l12.BrickColor=BrickColor.new(1013)game.Workspace.doorright.l21.BrickColor=BrickColor.new(1013)game.Workspace.doorright.l33.BrickColor=BrickColor.new(1013)game.Workspace.doorright.l42.BrickColor=BrickColor.new(1013)game.Workspace.doorright.l51.BrickColor=BrickColor.new(1013)game.Workspace.doorright.l63.BrickColor=BrickColor.new(1013)game.Workspace.doorright.l72.BrickColor=BrickColor.new(1013)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(1023)game.Workspace.doorright.pillar.BrickColor=BrickColor.new(game.Workspace.Lighting.cyan.Value)game.Workspace.Lighting.flashcurrent.Value="\049\050" | --------RIGHT DOOR --------
game.Workspace.doorright.l11.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l23.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l32.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l41.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l53.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l62.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l71.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l12.BrickColor = BrickColor.new(1013)
game.Workspace.doorright.l21.BrickColor = BrickColor.new(1013)
game.Workspace.doorright.l33.BrickColor = BrickColor.new(1013)
game.Workspace.doorright.l42.BrickColor = BrickColor.new(1013)
game.Workspace.doorright.l51.BrickColor = BrickColor.new(1013)
game.Workspace.doorright.l63.BrickColor = BrickColor.new(1013)
game.Workspace.doorright.l72.BrickColor = BrickColor.new(1013)
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(1023)
game.Workspace.doorright.pillar.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.Lighting.flashcurrent.Value = "12"
|
core.spawn(function()while myHuman.Health>0 do if not criticalAction and engineRunning then flight.checkCollisions()end wait()end end) | --Collision checking--
core.spawn(function()
while myHuman.Health > 0 do
if not criticalAction and engineRunning then
flight.checkCollisions()
end
wait()
end
end)
|
GUI=script.Parent.Parent.Parent.PlayerGui.TankGUI GUI.HP.Hitpoints.Text=(parts.Parent:findFirstChild("\068\097\109\097\103\101")).Value local v=parts.Parent:findFirstChild("\068\097\109\097\103\101")if v.Value<0 then GUI.HP.Hitpoints.Text="\068\073\083\065\066\076\069\068"end local R=math.random(40,80)braking=false firingMg=false reloading=false currRound=tankStats.Round myMouse=nil function updateAmmo()GUI.Ammo.Text="\067\097\110\110\111\110 \065\109\109\111 \061 "..tankStats[tankStats.Round.Value.."\065\109\109\111"].Value GUI.MG_Ammo.Text=tankStats.MGAmmo.Value GUI.HP.Hitpoints.Text=(parts.Parent:findFirstChild("\068\097\109\097\103\101")).Value end function Brakes()for v=1,5,1 do parts.Engine.BodyVelocity.Velocity=Vector3.new(0,0,0)print("\066\114\097\107\101\115 \097\099\116\105\118\097\116\101\100")end end Loaded=false | -- Player's tank GUI
GUI = script.Parent.Parent.Parent.PlayerGui.TankGUI
GUI.HP.Hitpoints.Text = parts.Parent:findFirstChild("Damage").Value
local Hull = parts.Parent:findFirstChild("Damage")
if Hull.Value < 0 then
GUI.HP.Hitpoints.Text = "DISABLED"
end
local MGDamage = math.random(40, 80)
braking = false
firingMg = false
reloading = false
currRound = tankStats.Round -- Current loaded ammo (AP/HE)
myMouse = nil
function updateAmmo()
GUI.Ammo.Text = "Cannon Ammo = " .. tankStats[tankStats.Round.Value .. "Ammo"].Value
GUI.MG_Ammo.Text = tankStats.MGAmmo.Value
GUI.HP.Hitpoints.Text = parts.Parent:findFirstChild("Damage").Value
end
function Brakes()
for i = 1, 5 do
parts.Engine.BodyVelocity.Velocity = Vector3.new(0, 0, 0)
print("Brakes activated")
end
end
Loaded = false
|
local v=Vector3.new(0,0,0)local R="\114\098\120\097\115\115\101\116\058\047\047\116\101\120\116\117\114\101\115\047\117\105\047\073\110\112\117\116\047\084\111\117\099\104\067\111\110\116\114\111\108\115\083\104\101\101\116\086\050\046\112\110\103"local E="\068\121\110\097\109\105\099\084\104\117\109\098\115\116\105\099\107\065\099\116\105\111\110"local e=Enum.ContextActionPriority.High.Value local U={.11,.3;.4;.5;.6,.7,.75}local Z=#U local a=true local F=.35 local k=.3 local B=.5 local x=TweenInfo.new(.15,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)local g=game:GetService("\080\108\097\121\101\114\115")local J=game:GetService("\071\117\105\083\101\114\118\105\099\101")local I=game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")local H=game:GetService("\067\111\110\116\101\120\116\065\099\116\105\111\110\083\101\114\118\105\099\101")local V=game:GetService("\082\117\110\083\101\114\118\105\099\101")local l=game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101") | --[[ Constants ]]
--
local ZERO_VECTOR3 = Vector3.new(0, 0, 0)
local TOUCH_CONTROLS_SHEET = "rbxasset://textures/ui/Input/TouchControlsSheetV2.png"
local DYNAMIC_THUMBSTICK_ACTION_NAME = "DynamicThumbstickAction"
local DYNAMIC_THUMBSTICK_ACTION_PRIORITY = Enum.ContextActionPriority.High.Value
local MIDDLE_TRANSPARENCIES = {
1 - 0.89,
1 - 0.70,
1 - 0.60,
1 - 0.50,
1 - 0.40,
1 - 0.30,
1 - 0.25,
}
local NUM_MIDDLE_IMAGES = #MIDDLE_TRANSPARENCIES
local FADE_IN_OUT_BACKGROUND = true
local FADE_IN_OUT_MAX_ALPHA = 0.35
local FADE_IN_OUT_HALF_DURATION_DEFAULT = 0.3
local FADE_IN_OUT_BALANCE_DEFAULT = 0.5
local ThumbstickFadeTweenInfo = TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut)
local Players = game:GetService("Players")
local GuiService = game:GetService("GuiService")
local UserInputService = game:GetService("UserInputService")
local ContextActionService = game:GetService("ContextActionService")
local RunService = game:GetService("RunService")
local TweenService = game:GetService("TweenService")
|
local v=false local R=script repeat Wait(0)until script and(script.Parent and script.Parent.ClassName=="\077\111\100\101\108")local E=R.Parent if R and(E and E:FindFirstChild("\084\104\117\109\098\110\097\105\108"))then(E:FindFirstChild("\084\104\117\109\098\110\097\105\108")):Destroy()end local e=Game:GetService("\068\101\098\114\105\115")local U for v,R in pairs(E:GetChildren())do if R and(R.ClassName=="\072\117\109\097\110\111\105\100"and R.Health~=0)then U=R end end local Z=E:Clone()if v then coroutine.resume(coroutine.create(function()if E and(U and(U:FindFirstChild("\083\116\097\116\117\115")and not(U:FindFirstChild("\083\116\097\116\117\115")):FindFirstChild("\065\118\097\108\105\098\108\101\083\112\097\119\110\115")))then SpawnModel=Instance.new("\077\111\100\101\108")SpawnModel.Parent=U.Status SpawnModel.Name="\065\118\097\108\105\098\108\101\083\112\097\119\110\115"else SpawnModel=(U:FindFirstChild("\083\116\097\116\117\115")):FindFirstChild("\065\118\097\108\105\098\108\101\083\112\097\119\110\115")end function FindSpawn(v)local R=v:GetChildren()for v=1,#R,1 do if R[v].className=="\083\112\097\119\110\076\111\099\097\116\105\111\110"then local E=Instance.new("\086\101\099\116\111\114\051\086\097\108\117\101",SpawnModel)E.Value=R[v].Position E.Name=R[v].Duration end FindSpawn(R[v])end end FindSpawn(Game:GetService("\087\111\114\107\115\112\097\099\101"))local v=SpawnModel:GetChildren()if#v>0 then local R=v[math.random(1,#v)]local U=Instance.new("\070\111\114\099\101\070\105\101\108\100")U.Parent=E U.Name="\083\112\097\119\110\070\111\114\099\101\070\105\101\108\100"e:AddItem(U,R.Name)E:MoveTo(R.Value+Vector3.new(0,3.5,0))else if E:FindFirstChild("\083\112\097\119\110\070\111\114\099\101\070\105\101\108\100")then(E:FindFirstChild("\083\112\097\119\110\070\111\114\099\101\070\105\101\108\100")):Destroy()end E:MoveTo(Vector3.new(0,115,0))end end))end function Respawn()Wait(5)Z.Parent=E.Parent Z:makeJoints();(Z:FindFirstChild("\072\101\097\100")):MakeJoints();(Z:FindFirstChild("\084\111\114\115\111")):MakeJoints()E:remove()end if R and(E and U)then U.Died:connect(Respawn)end | --[[ By: Brutez, 2/28/2015, 1:34 AM, (UTC-08:00) Pacific Time (US & Canada) ]]
--
local PlayerSpawning = false --[[ Change this to true if you want the NPC to spawn like a player, and change this to false if you want the NPC to spawn at it's current position. ]] --
local AdvancedRespawnScript = script
repeat
Wait(0)
until script and script.Parent and script.Parent.ClassName == "Model"
local JeffTheKiller = AdvancedRespawnScript.Parent
if AdvancedRespawnScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Thumbnail") then
JeffTheKiller:FindFirstChild("Thumbnail"):Destroy()
end
local GameDerbis = Game:GetService("Debris")
local JeffTheKillerHumanoid
for _, Child in pairs(JeffTheKiller:GetChildren()) do
if Child and Child.ClassName == "Humanoid" and Child.Health ~= 0 then
JeffTheKillerHumanoid = Child
end
end
local Respawndant = JeffTheKiller:Clone()
if PlayerSpawning then --[[ LOOK AT LINE: 2. ]] --
coroutine.resume(coroutine.create(function()
if
JeffTheKiller
and JeffTheKillerHumanoid
and JeffTheKillerHumanoid:FindFirstChild("Status")
and not JeffTheKillerHumanoid:FindFirstChild("Status"):FindFirstChild("AvalibleSpawns")
then
SpawnModel = Instance.new("Model")
SpawnModel.Parent = JeffTheKillerHumanoid.Status
SpawnModel.Name = "AvalibleSpawns"
else
SpawnModel = JeffTheKillerHumanoid:FindFirstChild("Status"):FindFirstChild("AvalibleSpawns")
end
function FindSpawn(SearchValue)
local PartsArchivable = SearchValue:GetChildren()
for AreaSearch = 1, #PartsArchivable do
if PartsArchivable[AreaSearch].className == "SpawnLocation" then
local PositionValue = Instance.new("Vector3Value", SpawnModel)
PositionValue.Value = PartsArchivable[AreaSearch].Position
PositionValue.Name = PartsArchivable[AreaSearch].Duration
end
FindSpawn(PartsArchivable[AreaSearch])
end
end
FindSpawn(Game:GetService("Workspace"))
local SpawnChilden = SpawnModel:GetChildren()
if #SpawnChilden > 0 then
local SpawnItself = SpawnChilden[math.random(1, #SpawnChilden)]
local RespawningForceField = Instance.new("ForceField")
RespawningForceField.Parent = JeffTheKiller
RespawningForceField.Name = "SpawnForceField"
GameDerbis:AddItem(RespawningForceField, SpawnItself.Name)
JeffTheKiller:MoveTo(SpawnItself.Value + Vector3.new(0, 3.5, 0))
else
if JeffTheKiller:FindFirstChild("SpawnForceField") then
JeffTheKiller:FindFirstChild("SpawnForceField"):Destroy()
end
JeffTheKiller:MoveTo(Vector3.new(0, 115, 0))
end
end))
end
function Respawn()
Wait(5)
Respawndant.Parent = JeffTheKiller.Parent
Respawndant:makeJoints()
Respawndant:FindFirstChild("Head"):MakeJoints()
Respawndant:FindFirstChild("Torso"):MakeJoints()
JeffTheKiller:remove()
end
if AdvancedRespawnScript and JeffTheKiller and JeffTheKillerHumanoid then
JeffTheKillerHumanoid.Died:connect(Respawn)
end
|
if horn==true then mouse.KeyDown:connect(function(v)if v==camkey and enabled==false then local v=car.DriveSeat local R=script.soundeffect:Clone()R.Name="\115\111\117\110\100\101\102\102\101\099\116\067\111\112"R.Parent=v.Horn elseif v==camkey and enabled==true then local v=car.DriveSeat v.Horn.soundeffectCop:Destroy()end car.DriveSeat.ChildRemoved:Connect(function(v)if v.Name=="\083\101\097\116\087\101\108\100"then local v=car.DriveSeat v.Horn.soundeffectCop:Destroy()end end)end)end | --------------------------------------------------------------------
if horn == true then
mouse.KeyDown:connect(function(key)
if key == camkey and enabled == false then
local seat = car.DriveSeat
local effect = script.soundeffect:Clone()
effect.Name = "soundeffectCop"
effect.Parent = seat.Horn
elseif key == camkey and enabled == true then
local seat = car.DriveSeat
seat.Horn.soundeffectCop:Destroy()
end
car.DriveSeat.ChildRemoved:Connect(function(child)
if child.Name == "SeatWeld" then
local seat = car.DriveSeat
seat.Horn.soundeffectCop:Destroy()
end
end)
end)
end
|
game.Players.PlayerAdded:Connect(function(v)DataManger.AddPlayerData(v)v.CharacterAdded:Connect(function(R)local E=R:WaitForChild("\072\117\109\097\110\111\105\100")E.JumpPower=0 E.JumpHeight=0 if v.Data.spawnpoint.Value~=""then local E=R:WaitForChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")local e=workspace.Interactions.Checkpoints:FindFirstChild(v.Data.spawnpoint.Value)if e then task.wait(.5)E.CFrame=e.Root.CFrame*CFrame.new(0,3,0)else warn("\078\079 \067\072\069\067\075\080\079\073\078\084 \070\079\085\078\068 \087\073\084\072 \084\072\069 \078\065\077\069\058 "..(v.Data.spawnpoint.Value.." \068\073\068 \089\079\085 \083\069\084 \085\080 \065 \067\072\069\067\075\080\079\073\078\084 \087\073\084\072 \084\072\065\084 \078\065\077\069\063"))end end end)end)game.Players.PlayerRemoving:Connect(DataManger.RemovePlayerData) | --this function runs when players join your game
game.Players.PlayerAdded:Connect(function(player)
DataManger.AddPlayerData(player)
--this function runs when your player is added to the world, it also runs again when you reset
player.CharacterAdded:Connect(function(char)
--this is called the player humanoid, it handles a lot of things like animations, jumping, walkspeed
local humanoid = char:WaitForChild("Humanoid")
--this is setting your jump power to 0, too disable player jumping!
humanoid.JumpPower = 0
humanoid.JumpHeight = 0
--this is handling for teleporting players to the checkPoints :)
if player.Data.spawnpoint.Value ~= "" then
local rootPart = char:WaitForChild("HumanoidRootPart")
local foundCheckpoint = workspace.Interactions.Checkpoints:FindFirstChild(player.Data.spawnpoint.Value)
if foundCheckpoint then
task.wait(0.5)
rootPart.CFrame = (foundCheckpoint.Root.CFrame * CFrame.new(0, 3, 0))
else
warn(
"NO CHECKPOINT FOUND WITH THE NAME: "
.. player.Data.spawnpoint.Value
.. " DID YOU SET UP A CHECKPOINT WITH THAT NAME?"
)
end
end
end)
end)
game.Players.PlayerRemoving:Connect(DataManger.RemovePlayerData)
|
settings.PianoSoundRange=50 settings.KeyAesthetics=true settings.PianoSounds={"\050\051\051\056\051\054\053\055\057","\050\051\051\056\052\052\048\052\057";"\050\051\051\056\052\053\054\056\048";"\050\051\051\056\053\050\056\052\049";"\050\051\051\056\053\052\049\051\053","\050\051\051\056\053\054\049\048\053"} | --EDIT BELOW----------------------------------------------------------------------
settings.PianoSoundRange = 50
settings.KeyAesthetics = true
settings.PianoSounds = {
"233836579",
"233844049",
"233845680",
"233852841",
"233854135",
"233856105",
}
|
game.Workspace.audiencebackleft1.Part1.BrickColor=BrickColor.new(106)game.Workspace.audiencebackleft1.Part2.BrickColor=BrickColor.new(106)game.Workspace.audiencebackleft1.Part3.BrickColor=BrickColor.new(106)game.Workspace.audiencebackleft1.Part4.BrickColor=BrickColor.new(1013)game.Workspace.audiencebackleft1.Part5.BrickColor=BrickColor.new(1013)game.Workspace.audiencebackleft1.Part6.BrickColor=BrickColor.new(1013)game.Workspace.audiencebackleft1.Part7.BrickColor=BrickColor.new(1023)game.Workspace.audiencebackleft1.Part8.BrickColor=BrickColor.new(1023)game.Workspace.audiencebackleft1.Part9.BrickColor=BrickColor.new(1023) | --------AUDIENCE BACK LEFT--------
game.Workspace.audiencebackleft1.Part1.BrickColor = BrickColor.new(106)
game.Workspace.audiencebackleft1.Part2.BrickColor = BrickColor.new(106)
game.Workspace.audiencebackleft1.Part3.BrickColor = BrickColor.new(106)
game.Workspace.audiencebackleft1.Part4.BrickColor = BrickColor.new(1013)
game.Workspace.audiencebackleft1.Part5.BrickColor = BrickColor.new(1013)
game.Workspace.audiencebackleft1.Part6.BrickColor = BrickColor.new(1013)
game.Workspace.audiencebackleft1.Part7.BrickColor = BrickColor.new(1023)
game.Workspace.audiencebackleft1.Part8.BrickColor = BrickColor.new(1023)
game.Workspace.audiencebackleft1.Part9.BrickColor = BrickColor.new(1023)
|
function ShoulderCamera.applyInput(E,v,R)local e=UserGameSettings:GetCameraYInvertValue()E.yaw=E.yaw+v E.pitch=math.clamp(E.pitch+R*e,E.minPitch,E.maxPitch)end function ShoulderCamera.processGamepadInput(R,v)local E=R.gamepadPan if E then E=gamepadLinearToCurve(E)if E.X==0 and E.Y==0 then R.lastThumbstickTime=nil if R.lastThumbstickPos.X==0 and R.lastThumbstickPos.Y==0 then R.currentGamepadSpeed=0 end end local e=0 local U=tick()if R.lastThumbstickTime then local Z=(U-R.lastThumbstickTime)*10 R.currentGamepadSpeed=R.currentGamepadSpeed+6*(Z^2/.7)if R.currentGamepadSpeed>6 then R.currentGamepadSpeed=6 end if R.lastGamepadVelocity then local v=(E-R.lastThumbstickPos)/(U-R.lastThumbstickTime)local e=(v-R.lastGamepadVelocity).Magnitude if e>12 then R.currentGamepadSpeed=R.currentGamepadSpeed*(20/e)if R.currentGamepadSpeed>6 then R.currentGamepadSpeed=6 end end end e=(GameSettings.GamepadCameraSensitivity*R.currentGamepadSpeed)*v R.lastGamepadVelocity=(E-R.lastThumbstickPos)/(U-R.lastThumbstickTime)end R.lastThumbstickPos=E R.lastThumbstickTime=U local Z=(-E.X*e)*R.gamepadSensitivityModifier.X local a=((e*E.Y)*GameSettings:GetCameraYInvertValue())*R.gamepadSensitivityModifier.Y R:applyInput(Z,a)end end function ShoulderCamera.handleTouchToolFiring(v)if v.touchObj then if v.lastTapEndTime then local R=tick()-v.lastTapEndTime if R<v.touchDelayTime and(v.currentTool and(v.touchPanAccumulator.Magnitude<.5 and(not v.firingTool and not v.applyingTouchPan)))then v.firingTool=true v.currentTool:Activate()end end else if v.currentTool and v.firingTool then v.currentTool:Deactivate()end v.firingTool=false end end function ShoulderCamera.isTouchPositionForCamera(R,v)if LocalPlayer then local R=LocalPlayer.PlayerGui:GetGuiObjectsAtPosition(v.X,v.Y)for v,R in ipairs(R)do if R.Name=="\068\121\110\097\109\105\099\084\104\117\109\098\115\116\105\099\107\070\114\097\109\101"then return false end end return true end return false end function ShoulderCamera.onInputBegan(E,v,R)if E.touchObj then E.touchObj=nil R=false end if v.KeyCode==Enum.KeyCode.Thumbstick2 then E.gamepadPan=Vector2.new(v.Position.X,v.Position.Y)elseif v.KeyCode==Enum.KeyCode.Thumbstick1 then E.movementPan=Vector2.new(v.Position.X,v.Position.Y)elseif v.UserInputType==Enum.UserInputType.Touch then local e=Vector2.new(v.Position.X,v.Position.Y)if not R and(E:isTouchPositionForCamera(e)and not E.touchObj)then E.touchObj=v E.touchStartTime=tick()E.eventConnections.touchChanged=v.Changed:Connect(function(R)if R=="\080\111\115\105\116\105\111\110"then local R=tick()-E.touchStartTime local U=Vector2.new(v.Position.X,v.Position.Y)local Z=(U-e)*E.currentTouchSensitivity local a=-Z.X local F=-Z.Y if E.touchPanAccumulator.Magnitude>.01 and R>E.touchDelayTime then if not E.applyingTouchPan then E.applyingTouchPan=true E.touchPanAccumulator=Vector2.new(0,0)end end E:applyInput(a,F)E.touchPanAccumulator=E.touchPanAccumulator+Vector2.new(a,F)e=U end end)end end end function ShoulderCamera.onInputChanged(E,v,R)if v.UserInputType==Enum.UserInputType.MouseMovement then local R=-v.Delta.X*E.currentMouseRadsPerPixel.X local e=-v.Delta.Y*E.currentMouseRadsPerPixel.Y E:applyInput(R,e)elseif v.KeyCode==Enum.KeyCode.Thumbstick2 then E.gamepadPan=Vector2.new(v.Position.X,v.Position.Y)elseif v.KeyCode==Enum.KeyCode.Thumbstick1 then E.movementPan=Vector2.new(v.Position.X,v.Position.Y)end end function ShoulderCamera.onInputEnded(E,v,R)if v.KeyCode==Enum.KeyCode.Thumbstick2 then E.gamepadPan=Vector2.new(0,0)elseif v.KeyCode==Enum.KeyCode.Thumbstick1 then E.movementPan=Vector2.new(0,0)elseif v.UserInputType==Enum.UserInputType.Touch then if E.touchObj==v then if E.eventConnections and E.eventConnections.touchChanged then E.eventConnections.touchChanged:Disconnect()E.eventConnections.touchChanged=nil end local v=tick()-E.touchStartTime if E.currentTool and E.firingTool then E.currentTool:Deactivate()elseif E.zoomState and(E.hasScope and(v<E.touchDelayTime and not E.applyingTouchPan))then E.currentTool:Activate()E.currentTool:Deactivate()end E.firingTool=false E.touchPanAccumulator=Vector2.new(0,0)if v<E.touchDelayTime and not E.applyingTouchPan then E.lastTapEndTime=tick()else E.lastTapEndTime=nil end E.applyingTouchPan=false E.gamepadPan=Vector2.new(0,0)E.touchObj=nil end end end return ShoulderCamera | -- Input related functions
function ShoulderCamera:applyInput(yaw, pitch)
local yInvertValue = UserGameSettings:GetCameraYInvertValue()
self.yaw = self.yaw + yaw
self.pitch = math.clamp(self.pitch + pitch * yInvertValue, self.minPitch, self.maxPitch)
end
function ShoulderCamera:processGamepadInput(dt)
local gamepadPan = self.gamepadPan
if gamepadPan then
gamepadPan = gamepadLinearToCurve(gamepadPan)
if gamepadPan.X == 0 and gamepadPan.Y == 0 then
self.lastThumbstickTime = nil
if self.lastThumbstickPos.X == 0 and self.lastThumbstickPos.Y == 0 then
self.currentGamepadSpeed = 0
end
end
local finalConstant = 0
local currentTime = tick()
if self.lastThumbstickTime then
local elapsed = (currentTime - self.lastThumbstickTime) * 10
self.currentGamepadSpeed = self.currentGamepadSpeed + (6 * ((elapsed ^ 2) / 0.7))
if self.currentGamepadSpeed > 6 then
self.currentGamepadSpeed = 6
end
if self.lastGamepadVelocity then
local velocity = (gamepadPan - self.lastThumbstickPos) / (currentTime - self.lastThumbstickTime)
local velocityDeltaMag = (velocity - self.lastGamepadVelocity).Magnitude
if velocityDeltaMag > 12 then
self.currentGamepadSpeed = self.currentGamepadSpeed * (20 / velocityDeltaMag)
if self.currentGamepadSpeed > 6 then
self.currentGamepadSpeed = 6
end
end
end
finalConstant = GameSettings.GamepadCameraSensitivity * self.currentGamepadSpeed * dt
self.lastGamepadVelocity = (gamepadPan - self.lastThumbstickPos) / (currentTime - self.lastThumbstickTime)
end
self.lastThumbstickPos = gamepadPan
self.lastThumbstickTime = currentTime
local yawInput = -gamepadPan.X * finalConstant * self.gamepadSensitivityModifier.X
local pitchInput = finalConstant
* gamepadPan.Y
* GameSettings:GetCameraYInvertValue()
* self.gamepadSensitivityModifier.Y
self:applyInput(yawInput, pitchInput)
end
end
function ShoulderCamera:handleTouchToolFiring()
if self.touchObj then
if self.lastTapEndTime then -- and not (self.zoomState and self.hasScope) then
local touchTime = tick() - self.lastTapEndTime
if
touchTime < self.touchDelayTime
and self.currentTool
and self.touchPanAccumulator.Magnitude < 0.5
and not self.firingTool
and not self.applyingTouchPan
then
self.firingTool = true
self.currentTool:Activate()
end
end
else
if self.currentTool and self.firingTool then
self.currentTool:Deactivate()
end
self.firingTool = false
end
end
function ShoulderCamera:isTouchPositionForCamera(pos)
if LocalPlayer then
local guiObjects = LocalPlayer.PlayerGui:GetGuiObjectsAtPosition(pos.X, pos.Y)
for _, guiObject in ipairs(guiObjects) do
if guiObject.Name == "DynamicThumbstickFrame" then
return false
end
end
return true
end
return false
end
function ShoulderCamera:onInputBegan(inputObj, wasProcessed)
if self.touchObj then
self.touchObj = nil
wasProcessed = false
end
if inputObj.KeyCode == Enum.KeyCode.Thumbstick2 then
self.gamepadPan = Vector2.new(inputObj.Position.X, inputObj.Position.Y)
elseif inputObj.KeyCode == Enum.KeyCode.Thumbstick1 then
self.movementPan = Vector2.new(inputObj.Position.X, inputObj.Position.Y)
elseif inputObj.UserInputType == Enum.UserInputType.Touch then
local touchStartPos = Vector2.new(inputObj.Position.X, inputObj.Position.Y)
if not wasProcessed and self:isTouchPositionForCamera(touchStartPos) and not self.touchObj then
self.touchObj = inputObj
self.touchStartTime = tick()
self.eventConnections.touchChanged = inputObj.Changed:Connect(function(prop)
if prop == "Position" then
local touchTime = tick() - self.touchStartTime
local newTouchPos = Vector2.new(inputObj.Position.X, inputObj.Position.Y)
local delta = (newTouchPos - touchStartPos) * self.currentTouchSensitivity
local yawInput = -delta.X
local pitchInput = -delta.Y
if self.touchPanAccumulator.Magnitude > 0.01 and touchTime > self.touchDelayTime then
if not self.applyingTouchPan then
self.applyingTouchPan = true
self.touchPanAccumulator = Vector2.new(0, 0)
end
end
self:applyInput(yawInput, pitchInput)
self.touchPanAccumulator = self.touchPanAccumulator + Vector2.new(yawInput, pitchInput)
touchStartPos = newTouchPos
end
end)
end
end
end
function ShoulderCamera:onInputChanged(inputObj, wasProcessed)
if inputObj.UserInputType == Enum.UserInputType.MouseMovement then
local yawInput = -inputObj.Delta.X * self.currentMouseRadsPerPixel.X
local pitchInput = -inputObj.Delta.Y * self.currentMouseRadsPerPixel.Y
self:applyInput(yawInput, pitchInput)
elseif inputObj.KeyCode == Enum.KeyCode.Thumbstick2 then
self.gamepadPan = Vector2.new(inputObj.Position.X, inputObj.Position.Y)
elseif inputObj.KeyCode == Enum.KeyCode.Thumbstick1 then
self.movementPan = Vector2.new(inputObj.Position.X, inputObj.Position.Y)
end
end
function ShoulderCamera:onInputEnded(inputObj, wasProcessed)
if inputObj.KeyCode == Enum.KeyCode.Thumbstick2 then
self.gamepadPan = Vector2.new(0, 0)
elseif inputObj.KeyCode == Enum.KeyCode.Thumbstick1 then
self.movementPan = Vector2.new(0, 0)
elseif inputObj.UserInputType == Enum.UserInputType.Touch then
if self.touchObj == inputObj then
if self.eventConnections and self.eventConnections.touchChanged then
self.eventConnections.touchChanged:Disconnect()
self.eventConnections.touchChanged = nil
end
local touchTime = tick() - self.touchStartTime
if self.currentTool and self.firingTool then
self.currentTool:Deactivate()
elseif
self.zoomState
and self.hasScope
and touchTime < self.touchDelayTime
and not self.applyingTouchPan
then
self.currentTool:Activate() -- this makes sure to shoot the sniper with a single tap when it is zoomed in
self.currentTool:Deactivate()
end
self.firingTool = false
self.touchPanAccumulator = Vector2.new(0, 0)
if touchTime < self.touchDelayTime and not self.applyingTouchPan then
self.lastTapEndTime = tick()
else
self.lastTapEndTime = nil
end
self.applyingTouchPan = false
self.gamepadPan = Vector2.new(0, 0)
self.touchObj = nil
end
end
end
return ShoulderCamera
|
function HighlightPianoKey(v,R)if not Settings.KeyAesthetics then return end local E=math.ceil(v/12)local e=(v-1)%12+1 local U=Piano.Keys.Keys:FindFirstChild(v)local Z=Piano.Case.ParticleEmitters:FindFirstChild(v)if U and Z then local R=U local E={}Z.ParticleEmitter:Emit(1)if IsBlack(v)then U.Material="\078\101\111\110"E.Color=Color3.fromRGB(70,158,44)Tween(R,E,.15,true,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false)U.Material="\078\101\111\110"else U.Material="\078\101\111\110"E.Color=Color3.fromRGB(106,255,106)Tween(R,E,.15,true,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false)U.Material="\078\101\111\110"end E={}E.Color=Color3.fromRGB(130,130,130)Tween(R,E,.05,true,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false)U.Material="\083\109\111\111\116\104\080\108\097\115\116\105\099"else print(v.." \119\097\115 \110\111\116 \102\111\117\110\100 \097\115 \101\105\116\104\101\114 \097 \107\101\121 \111\114 \101\109\105\116\116\101\114 \111\114 \098\111\116\104")end return end | --[[
AnimateKey(note1,px,py,pz,ox,oy,oz,Time)
--note1(1-61), position x, position y, position z, orientation x, orientation y, orientation z, time
local obj = --object or gui or wahtever goes here
local Properties = {}
Properties.Size = UDim2.new()
Tween(obj,Properties,2,true,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false)
--Obj,Property,Time,wait,Easingstyle,EasingDirection,RepeatAmt,Reverse
]]
function HighlightPianoKey(note1, transpose)
if not Settings.KeyAesthetics then
return
end
local octave = math.ceil(note1 / 12)
local note2 = (note1 - 1) % 12 + 1
local key = Piano.Keys.Keys:FindFirstChild(note1)
local emitter = Piano.Case.ParticleEmitters:FindFirstChild(note1)
if key and emitter then
local obj = key
local Properties = {}
emitter.ParticleEmitter:Emit(1)
if IsBlack(note1) then
key.Material = "Neon"
Properties.Color = Color3.fromRGB(70, 158, 44)
Tween(obj, Properties, 0.15, true, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false)
key.Material = "Neon"
else
key.Material = "Neon"
Properties.Color = Color3.fromRGB(106, 255, 106)
Tween(obj, Properties, 0.15, true, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false)
key.Material = "Neon"
end
Properties = {}
Properties.Color = Color3.fromRGB(130, 130, 130)
Tween(obj, Properties, 0.05, true, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false)
key.Material = "SmoothPlastic"
else
print(note1 .. " was not found as either a key or emitter or both")
end
return
end
|
Tune.Weight=250 Tune.WeightBSize={6,3.5;14}Tune.WeightDist=1 Tune.CGHeight=.9 Tune.WBVisible=false Tune.FWheelDensity=.1 Tune.RWheelDensity=.1 Tune.FWLgcyDensity=1 Tune.RWLgcyDensity=1 Tune.AxleSize=2 Tune.AxleDensity=.1 | --[[Weight and CG]]
Tune.Weight = 250 -- Total weight (in pounds)
Tune.WeightBSize = { -- Size of weight brick (dimmensions in studs ; larger = more stable)
--[[Width]]
6,
--[[Height]]
3.5,
--[[Length]]
14,
}
Tune.WeightDist = 1 -- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
Tune.CGHeight = 0.9 -- Center of gravity height (studs relative to median of all wheels)
Tune.WBVisible = false -- Makes the weight brick visible
--Unsprung Weight
Tune.FWheelDensity = 0.1 -- Front Wheel Density
Tune.RWheelDensity = 0.1 -- Rear Wheel Density
Tune.FWLgcyDensity = 1 -- Front Wheel Density [PGS OFF]
Tune.RWLgcyDensity = 1 -- Rear Wheel Density [PGS OFF]
Tune.AxleSize = 2 -- Size of structural members (larger = more stable/carry more weight)
Tune.AxleDensity = 0.1 -- Density of structural members
|
local v="\066\097\115\101\070\114\097\109\101"local R="\066\097\115\101\077\101\115\115\097\103\101"local E="\085\112\100\097\116\101\084\101\120\116\070\117\110\099\116\105\111\110"local e="\071\101\116\072\101\105\103\104\116\070\117\110\099\116\105\111\110"local U="\070\097\100\101\073\110\070\117\110\099\116\105\111\110"local Z="\070\097\100\101\079\117\116\070\117\110\099\116\105\111\110"local a="\085\112\100\097\116\101\065\110\105\109\070\117\110\099\116\105\111\110"local F=game:GetService("\084\101\120\116\083\101\114\118\105\099\101")local k=game:GetService("\080\108\097\121\101\114\115")local B=k.LocalPlayer while not B do k.ChildAdded:wait()B=k.LocalPlayer end local x=script.Parent.Parent local g=require(x:WaitForChild("\067\104\097\116\083\101\116\116\105\110\103\115"))local J=require(x:WaitForChild("\067\104\097\116\067\111\110\115\116\097\110\116\115"))local I,H=pcall(function()return(UserSettings()):IsUserFeatureEnabled("\085\115\101\114\083\104\111\117\108\100\067\108\105\112\073\110\071\097\109\101\067\104\097\116")end)local V=I and H local l={}local b={}b.__index=b function b.GetStringTextBounds(U,v,R,E,e)e=e or Vector2.new(10000,10000)return F:GetTextSize(v,E,R,e)end | ---Creator function return object keys
local KEY_BASE_FRAME = "BaseFrame"
local KEY_BASE_MESSAGE = "BaseMessage"
local KEY_UPDATE_TEXT_FUNC = "UpdateTextFunction"
local KEY_GET_HEIGHT = "GetHeightFunction"
local KEY_FADE_IN = "FadeInFunction"
local KEY_FADE_OUT = "FadeOutFunction"
local KEY_UPDATE_ANIMATION = "UpdateAnimFunction"
local TextService = game:GetService("TextService")
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
while not LocalPlayer do
Players.ChildAdded:wait()
LocalPlayer = Players.LocalPlayer
end
local clientChatModules = script.Parent.Parent
local ChatSettings = require(clientChatModules:WaitForChild("ChatSettings"))
local ChatConstants = require(clientChatModules:WaitForChild("ChatConstants"))
local okShouldClipInGameChat, valueShouldClipInGameChat = pcall(function()
return UserSettings():IsUserFeatureEnabled("UserShouldClipInGameChat")
end)
local shouldClipInGameChat = okShouldClipInGameChat and valueShouldClipInGameChat
local module = {}
local methods = {}
methods.__index = methods
function methods:GetStringTextBounds(text, font, textSize, sizeBounds)
sizeBounds = sizeBounds or Vector2.new(10000, 10000)
return TextService:GetTextSize(text, textSize, font, sizeBounds)
end
|
Button.Activated:Connect(function()if MarketplaceService:UserOwnsGamePassAsync(PlayerId,Gamepass.Value)then Message.Properties.Type.ItemAlreadyOwn.Value=true Message.Properties.FireMessage.Value=true else if GamepassInfo.IsForSale==true then MarketplaceService:PromptProductPurchase(Player,Gamepass.Value)else Message.Properties.Type.NotForSale.Value=true Message.Properties.FireMessage.Value=true end end end) | --Script:
Button.Activated:Connect(function()
if MarketplaceService:UserOwnsGamePassAsync(PlayerId, Gamepass.Value) then
--FireMessage
Message.Properties.Type.ItemAlreadyOwn.Value = true
Message.Properties.FireMessage.Value = true
else
if GamepassInfo["IsForSale"] == true then
MarketplaceService:PromptProductPurchase(Player, Gamepass.Value)
else
Message.Properties.Type.NotForSale.Value = true
Message.Properties.FireMessage.Value = true
end
end
end)
|
Brio.DEAD=Brio.new()Brio.DEAD:Kill()return Brio | --[=[
An already dead brio which may be used for identity purposes.
```lua
print(Brio.DEAD:IsDead()) --> true
```
@prop DEAD Brio
@within Brio
]=]
Brio.DEAD = Brio.new()
Brio.DEAD:Kill()
return Brio
|
local v=Frames.OptionsFrame local R=v.BaseFrame local E=v.Frames local e=nil local U=nil local Z=false local a=false local function F()for v=1,.6,-0.025 do U.Visible=true U.BackgroundTransparency=v Frames.Back.Transparency=v print(v)U=true a=true task.wait()end end local function k()for v=.6,1,.025 do U.BackgroundTransparency=v Frames.Back.Transparency=v print(v)task.wait()end U.Visible=false Z=false task.wait(.4)a=false end for v,B in pairs(Buttonsframe:GetDescendants())do if B:IsA("\084\101\120\116\066\117\116\116\111\110")then B.MouseButton1Click:Connect(function()e=B.Name.."\070\114\097\109\101"U=E:FindFirstChild(e)if not U.Visible then if not Z and not a then for v,R in pairs(R:GetDescendants())do if R:IsA("\084\101\120\116\066\117\116\116\111\110")and B.Name~=ButtonSelected then R.BackgroundTransparency=.95 R.Selectable=false B.BackgroundTransparency=.5 end end F()end else for v,R in pairs(R:GetDescendants())do if R:IsA("\084\101\120\116\066\117\116\116\111\110")and B.Name~=ButtonSelected then R.BackgroundTransparency=.6 R.Selectable=true B.BackgroundTransparency=.6 end end k()end end)end end | --OptionsManager
local OptionsFrame = Frames.OptionsFrame
local FrameBase = OptionsFrame.BaseFrame
local OptionsFrames = OptionsFrame.Frames
local OptionFrameName = nil
local OptionFrameToOpen = nil
local OptionFrameIsOpened = false
local OptionDebounce = false
local function OptionOpenGUI()
for i = 1, 0.6, -0.025 do
OptionFrameToOpen.Visible = true
OptionFrameToOpen.BackgroundTransparency = i
Frames.Back.Transparency = i
print(i)
OptionFrameToOpen = true
OptionDebounce = true
task.wait()
end
end
local function OptionCloseGUI()
for i = 0.6, 1, 0.025 do
OptionFrameToOpen.BackgroundTransparency = i
Frames.Back.Transparency = i
print(i)
task.wait()
end
OptionFrameToOpen.Visible = false
OptionFrameIsOpened = false
task.wait(0.4)
OptionDebounce = false
end
for _, OptionButton in pairs(Buttonsframe:GetDescendants()) do
if OptionButton:IsA("TextButton") then
OptionButton.MouseButton1Click:Connect(function()
OptionFrameName = OptionButton.Name .. "Frame"
OptionFrameToOpen = OptionsFrames:FindFirstChild(OptionFrameName)
if not OptionFrameToOpen.Visible then
if not OptionFrameIsOpened and not OptionDebounce then
for _, OptionButtons in pairs(FrameBase:GetDescendants()) do
if OptionButtons:IsA("TextButton") and OptionButton.Name ~= ButtonSelected then
OptionButtons.BackgroundTransparency = 0.95
OptionButtons.Selectable = false
OptionButton.BackgroundTransparency = 0.5
end
end
OptionOpenGUI()
end
else
for _, OptionButtons in pairs(FrameBase:GetDescendants()) do
if OptionButtons:IsA("TextButton") and OptionButton.Name ~= ButtonSelected then
OptionButtons.BackgroundTransparency = 0.6
OptionButtons.Selectable = true
OptionButton.BackgroundTransparency = 0.6
end
end
OptionCloseGUI()
end
end)
end
end
|
local v=Vector3.new local R=NumberSequenceKeypoint.new(0,1,0)local E=NumberSequenceKeypoint.new(1,1,0)local e={}for v,R in pairs(RAIN_VOLUME_SCAN_GRID)do table.insert(e,R*RAIN_VOLUME_SCAN_RADIUS)end table.sort(e,function(v,R)return v.magnitude<R.magnitude end) | -- shorthands
local v3 = Vector3.new
local NSK010 = NumberSequenceKeypoint.new(0, 1, 0)
local NSK110 = NumberSequenceKeypoint.new(1, 1, 0)
local volumeScanGrid = {} -- Pre-generate grid used for raining area distance scanning
for _, v in pairs(RAIN_VOLUME_SCAN_GRID) do
table.insert(volumeScanGrid, v * RAIN_VOLUME_SCAN_RADIUS)
end
table.sort(volumeScanGrid, function(a, b) -- Optimization: sort from close to far away for fast evaluation if closeby
return a.magnitude < b.magnitude
end)
|
for v=1,NumberOfHotbarSlots,1 do local R=MakeSlot(HotbarFrame,v)R.Frame.Visible=false if not LowestEmptySlot then LowestEmptySlot=R end end InventoryIcon.selected:Connect(function()if not GuiService.MenuIsOpen then BackpackScript.OpenClose()end end)InventoryIcon.deselected:Connect(function()if InventoryFrame.Visible then BackpackScript.OpenClose()end end)LeftBumperButton=NewGui("\073\109\097\103\101\076\097\098\101\108","\076\101\102\116\066\117\109\112\101\114")LeftBumperButton.Size=UDim2.new(0,40,0,40)LeftBumperButton.Position=UDim2.new(0,-LeftBumperButton.Size.X.Offset,.5,-LeftBumperButton.Size.Y.Offset/2)RightBumperButton=NewGui("\073\109\097\103\101\076\097\098\101\108","\082\105\103\104\116\066\117\109\112\101\114")RightBumperButton.Size=UDim2.new(0,40,0,40)RightBumperButton.Position=UDim2.new(1,0,.5,-RightBumperButton.Size.Y.Offset/2) | -- Make all the Hotbar Slots
for i = 1, NumberOfHotbarSlots do
local slot = MakeSlot(HotbarFrame, i)
slot.Frame.Visible = false
if not LowestEmptySlot then
LowestEmptySlot = slot
end
end
InventoryIcon.selected:Connect(function()
if not GuiService.MenuIsOpen then
BackpackScript.OpenClose()
end
end)
InventoryIcon.deselected:Connect(function()
if InventoryFrame.Visible then
BackpackScript.OpenClose()
end
end)
LeftBumperButton = NewGui("ImageLabel", "LeftBumper")
LeftBumperButton.Size = UDim2.new(0, 40, 0, 40)
LeftBumperButton.Position = UDim2.new(0, -LeftBumperButton.Size.X.Offset, 0.5, -LeftBumperButton.Size.Y.Offset / 2)
RightBumperButton = NewGui("ImageLabel", "RightBumper")
RightBumperButton.Size = UDim2.new(0, 40, 0, 40)
RightBumperButton.Position = UDim2.new(1, 0, 0.5, -RightBumperButton.Size.Y.Offset / 2)
|
local v=Roact.PureComponent:extend(script.Name)function v.init(v)v.Active=true v:setState({ShouldWarnAboutHttpService=false,ShouldWarnAboutUpdate=false})fastSpawn(function()local R=v.props.Core.IsVersionOutdated()if v.Active then v:setState({ShouldWarnAboutUpdate=R})end end)fastSpawn(function()local R=v.props.Core local E=R.Mode=="\084\111\111\108"and not R.SyncAPI:Invoke("\073\115\072\116\116\112\083\101\114\118\105\099\101\069\110\097\098\108\101\100")if v.Active then v:setState({ShouldWarnAboutHttpService=E})end end)end function v.willUnmount(v)v.Active=false end function v.render(v)return new("\083\099\114\101\101\110\071\117\105",{},{Container=new("\070\114\097\109\101",{AnchorPoint=Vector2.new(.5,.5),BackgroundTransparency=1;Position=UDim2.new(.5,0,.5,0);Size=UDim2.new(0,300,1,0)},{Layout=new("\085\073\076\105\115\116\076\097\121\111\117\116",{Padding=UDim.new(0,10),FillDirection=Enum.FillDirection.Vertical,HorizontalAlignment=Enum.HorizontalAlignment.Left;VerticalAlignment=Enum.VerticalAlignment.Center;SortOrder=Enum.SortOrder.LayoutOrder});UpdateNotification=(v.state.ShouldWarnAboutUpdate or nil)and new(NotificationDialog,{LayoutOrder=1,ThemeColor=Color3.fromRGB(255,170,0),NoticeText="\084\104\105\115 \118\101\114\115\105\111\110 \111\102 \066\117\105\108\100\105\110\103 \084\111\111\108\115 \105\115 \060\098\062\111\117\116\100\097\116\101\100\046\060\047\098\062";DetailText=v.props.Core.Mode=="\080\108\117\103\105\110"and"\084\111 \117\112\100\097\116\101 \112\108\117\103\105\110\115\044 \103\111 \116\111\n\060\098\062\080\076\085\071\073\078\083\060\047\098\062 \062 \060\098\062\077\097\110\097\103\101 \080\108\117\103\105\110\115\060\047\098\062 \058-\041"or"\079\119\110 \116\104\105\115 \112\108\097\099\101\063 \083\105\109\112\108\121 \060\098\062\114\101\105\110\115\101\114\116\060\047\098\062 \116\104\101 \066\117\105\108\100\105\110\103 \084\111\111\108\115 \109\111\100\101\108\046",OnDismiss=function()v:setState({ShouldWarnAboutUpdate=false})end}),HTTPEnabledNotification=(v.state.ShouldWarnAboutHttpService or nil)and new(NotificationDialog,{LayoutOrder=0,ThemeColor=Color3.fromRGB(255,0,4),NoticeText="\072\084\084\080 \114\101\113\117\101\115\116\115 \109\117\115\116 \098\101 \060\098\062\101\110\097\098\108\101\100\060\047\098\062 \102\111\114 \115\111\109\101 \102\101\097\116\117\114\101\115 \111\102 \066\117\105\108\100\105\110\103 \084\111\111\108\115 \116\111 \119\111\114\107\044 \105\110\099\108\117\100\105\110\103 \101\120\112\111\114\116\105\110\103\046",DetailText="\079\119\110 \116\104\105\115 \112\108\097\099\101\063 \069\100\105\116 \105\116 \105\110 \083\116\117\100\105\111\044 \097\110\100 \116\111\103\103\108\101 \111\110\n\072\079\077\069 \062 \060\098\062\071\097\109\101 \083\101\116\116\105\110\103\115\060\047\098\062 \062 \083\101\099\117\114\105\116\121 \062 \060\098\062\065\108\108\111\119 \072\084\084\080 \082\101\113\117\101\115\116\115\060\047\098\062 \058-\041";OnDismiss=function()v:setState({ShouldWarnAboutHttpService=false})end})})})end return v | -- Create component
local Notifications = Roact.PureComponent:extend(script.Name)
function Notifications:init()
self.Active = true
self:setState({
ShouldWarnAboutHttpService = false,
ShouldWarnAboutUpdate = false,
})
fastSpawn(function()
local IsOutdated = self.props.Core.IsVersionOutdated()
if self.Active then
self:setState({
ShouldWarnAboutUpdate = IsOutdated,
})
end
end)
fastSpawn(function()
local Core = self.props.Core
local IsHttpServiceDisabled = (Core.Mode == "Tool") and not Core.SyncAPI:Invoke("IsHttpServiceEnabled")
if self.Active then
self:setState({
ShouldWarnAboutHttpService = IsHttpServiceDisabled,
})
end
end)
end
function Notifications:willUnmount()
self.Active = false
end
function Notifications:render()
return new("ScreenGui", {}, {
Container = new("Frame", {
AnchorPoint = Vector2.new(0.5, 0.5),
BackgroundTransparency = 1,
Position = UDim2.new(0.5, 0, 0.5, 0),
Size = UDim2.new(0, 300, 1, 0),
}, {
Layout = new("UIListLayout", {
Padding = UDim.new(0, 10),
FillDirection = Enum.FillDirection.Vertical,
HorizontalAlignment = Enum.HorizontalAlignment.Left,
VerticalAlignment = Enum.VerticalAlignment.Center,
SortOrder = Enum.SortOrder.LayoutOrder,
}),
UpdateNotification = (self.state.ShouldWarnAboutUpdate or nil) and new(NotificationDialog, {
LayoutOrder = 1,
ThemeColor = Color3.fromRGB(255, 170, 0),
NoticeText = "This version of Building Tools is <b>outdated.</b>",
DetailText = (self.props.Core.Mode == "Plugin")
and "To update plugins, go to\n<b>PLUGINS</b> > <b>Manage Plugins</b> :-)"
or "Own this place? Simply <b>reinsert</b> the Building Tools model.",
OnDismiss = function()
self:setState({
ShouldWarnAboutUpdate = false,
})
end,
}),
HTTPEnabledNotification = (self.state.ShouldWarnAboutHttpService or nil)
and new(NotificationDialog, {
LayoutOrder = 0,
ThemeColor = Color3.fromRGB(255, 0, 4),
NoticeText = "HTTP requests must be <b>enabled</b> for some features of Building Tools to work, including exporting.",
DetailText = "Own this place? Edit it in Studio, and toggle on\nHOME > <b>Game Settings</b> > Security > <b>Allow HTTP Requests</b> :-)",
OnDismiss = function()
self:setState({
ShouldWarnAboutHttpService = false,
})
end,
}),
}),
})
end
return Notifications
|
function Registry.RegisterTypesIn(R,v)for v,E in pairs(v:GetChildren())do if E:IsA("\077\111\100\117\108\101\083\099\114\105\112\116")then E.Parent=R.Cmdr.ReplicatedRoot.Types;(require(E))(R)else R:RegisterTypesIn(E)end end end | --- Helper method that registers types from all module scripts in a specific container.
function Registry:RegisterTypesIn(container)
for _, object in pairs(container:GetChildren()) do
if object:IsA("ModuleScript") then
object.Parent = self.Cmdr.ReplicatedRoot.Types
require(object)(self)
else
self:RegisterTypesIn(object)
end
end
end
|
CanSelectFire=true BurstEnabled=false SemiEnabled=true AutoEnabled=true BoltAction=false ExplosiveEnabled=false | --// Firemode Settings
CanSelectFire = true
BurstEnabled = false
SemiEnabled = true
AutoEnabled = true
BoltAction = false
ExplosiveEnabled = false
|
local v=Vector3.new(0,0,0)local R="\114\098\120\097\115\115\101\116\058\047\047\116\101\120\116\117\114\101\115\047\117\105\047\073\110\112\117\116\047\084\111\117\099\104\067\111\110\116\114\111\108\115\083\104\101\101\116\086\050\046\112\110\103"local E="\068\121\110\097\109\105\099\084\104\117\109\098\115\116\105\099\107\065\099\116\105\111\110"local e=Enum.ContextActionPriority.High.Value local U={.11,.3;.4;.5;.6,.7,.75}local Z=#U local a=true local F=.35 local k=.3 local B=.5 local x=TweenInfo.new(.15,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)local g=game:GetService("\080\108\097\121\101\114\115")local J=game:GetService("\071\117\105\083\101\114\118\105\099\101")local I=game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")local H=game:GetService("\067\111\110\116\101\120\116\065\099\116\105\111\110\083\101\114\118\105\099\101")local V=game:GetService("\082\117\110\083\101\114\118\105\099\101")local l=game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")local b=g.LocalPlayer if not b then(g:GetPropertyChangedSignal("\076\111\099\097\108\080\108\097\121\101\114")):Wait()b=g.LocalPlayer end | --[[ Constants ]]
--
local ZERO_VECTOR3 = Vector3.new(0, 0, 0)
local TOUCH_CONTROLS_SHEET = "rbxasset://textures/ui/Input/TouchControlsSheetV2.png"
local DYNAMIC_THUMBSTICK_ACTION_NAME = "DynamicThumbstickAction"
local DYNAMIC_THUMBSTICK_ACTION_PRIORITY = Enum.ContextActionPriority.High.Value
local MIDDLE_TRANSPARENCIES = {
1 - 0.89,
1 - 0.70,
1 - 0.60,
1 - 0.50,
1 - 0.40,
1 - 0.30,
1 - 0.25,
}
local NUM_MIDDLE_IMAGES = #MIDDLE_TRANSPARENCIES
local FADE_IN_OUT_BACKGROUND = true
local FADE_IN_OUT_MAX_ALPHA = 0.35
local FADE_IN_OUT_HALF_DURATION_DEFAULT = 0.3
local FADE_IN_OUT_BALANCE_DEFAULT = 0.5
local ThumbstickFadeTweenInfo = TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut)
local Players = game:GetService("Players")
local GuiService = game:GetService("GuiService")
local UserInputService = game:GetService("UserInputService")
local ContextActionService = game:GetService("ContextActionService")
local RunService = game:GetService("RunService")
local TweenService = game:GetService("TweenService")
local LocalPlayer = Players.LocalPlayer
if not LocalPlayer then
Players:GetPropertyChangedSignal("LocalPlayer"):Wait()
LocalPlayer = Players.LocalPlayer
end
|
game.Workspace.djbacklight.l1.BrickColor=BrickColor.new(194)game.Workspace.djbacklight.l2.BrickColor=BrickColor.new(194)game.Workspace.djbacklight.l3.BrickColor=BrickColor.new(194)game.Workspace.djbacklight.l4.BrickColor=BrickColor.new(194) | --------END LIGHT SET 1--------
--------DJ BACKLIGHT--------
game.Workspace.djbacklight.l1.BrickColor = BrickColor.new(194)
game.Workspace.djbacklight.l2.BrickColor = BrickColor.new(194)
game.Workspace.djbacklight.l3.BrickColor = BrickColor.new(194)
game.Workspace.djbacklight.l4.BrickColor = BrickColor.new(194)
|
leftshoulderclone=leftshoulder:Clone()leftshoulderclone.Name="\076\101\102\116\083\104\111\117\108\100\101\114\067\108\111\110\101"leftshoulderclone.Parent=torso leftshoulderclone.Part0=torso | --
leftshoulderclone = leftshoulder:Clone()
leftshoulderclone.Name = "LeftShoulderClone"
leftshoulderclone.Parent = torso
leftshoulderclone.Part0 = torso
|
local v=game.Workspace.GameHolder local R=v.GamemodesMapHolder local E=v.GameAssetsHolder local e=game.Workspace.Lobby | -- / Workspace Assets / --
local GameHolder = game.Workspace.GameHolder
local GamemodesMapHolder = GameHolder.GamemodesMapHolder
local GameAssetsHolder = GameHolder.GameAssetsHolder
local Lobby = game.Workspace.Lobby
|
function FpsCamera.OnCharacterAdded(b,h)local I=b.MirrorBin if I then I:ClearAllChildren()I.Parent=nil end b.HeadMirrors={}for h,I in pairs(h:GetDescendants())do b:AddHeadMirror(I)end b:Connect("\065\100\100\072\101\097\100\077\105\114\114\111\114",h.DescendantAdded)b:Connect("\082\101\109\111\118\101\072\101\097\100\077\105\114\114\111\114",h.DescendantRemoving)end | -- Called when the player's character is added.
-- Sets up mirroring of the player's head for first person.
function FpsCamera:OnCharacterAdded(character)
local mirrorBin = self.MirrorBin
if mirrorBin then
mirrorBin:ClearAllChildren()
mirrorBin.Parent = nil
end
self.HeadMirrors = {}
for _, desc in pairs(character:GetDescendants()) do
self:AddHeadMirror(desc)
end
self:Connect("AddHeadMirror", character.DescendantAdded)
self:Connect("RemoveHeadMirror", character.DescendantRemoving)
end
|
return function(h,b)b.Parent.OrbThrow.Use:Fire(h.Character)delay(4,function()print("\078\101\119 \099\104\097\114\097\099\116\101\114")game.ReplicatedStorage.Events.System.NewCharacterServer:Fire(h)end)end | --edit the below function to execute code when this response is chosen OR this prompt is shown
--player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data
return function(player, dialogueFolder)
dialogueFolder.Parent.OrbThrow.Use:Fire(player.Character)
delay(4, function()
print("New character")
game.ReplicatedStorage.Events.System.NewCharacterServer:Fire(player)
end)
end
|
game.StarterGui.ResetPlayerGuiOnSpawn=false ScreenGui.Parent=Player.PlayerGui | -- Initialization
game.StarterGui.ResetPlayerGuiOnSpawn = false
ScreenGui.Parent = Player.PlayerGui
|
function Janitor.__index.Cleanup(h)if not h.CurrentlyCleaning then h.CurrentlyCleaning=nil for b,I in next,h do if b==IndicesReference then continue end if I==true then b()else local h=b[I]if h then h(b)end end h[b]=nil end local b=h[IndicesReference]if b then for h in next,b do b[h]=nil end h[IndicesReference]={}end h.CurrentlyCleaning=false end end | --[[**
Calls each Object's `MethodName` (or calls the Object if `MethodName == true`) and removes them from the Janitor. Also clears the namespace. This function is also called when you call a Janitor Object (so it can be used as a destructor callback).
@returns [t:void]
**--]]
function Janitor.__index:Cleanup()
if not self.CurrentlyCleaning then
self.CurrentlyCleaning = nil
for Object, MethodName in next, self do
if Object == IndicesReference then
continue
end
if MethodName == true then
Object()
else
local ObjectMethod = Object[MethodName]
if ObjectMethod then
ObjectMethod(Object)
end
end
self[Object] = nil
end
local This = self[IndicesReference]
if This then
for Index in next, This do
This[Index] = nil
end
self[IndicesReference] = {}
end
self.CurrentlyCleaning = false
end
end
|
InputService=game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")Mouse=Player:GetMouse()TextBoxFocused=false FocusLost=false ShiftLock=false | ----------------------------------
------------VARIABLES-------------
----------------------------------
InputService = game:GetService("UserInputService")
Mouse = Player:GetMouse()
TextBoxFocused = false
FocusLost = false
ShiftLock = false
|
while Figure.Parent~=nil do local h,b=wait(.1)move(b)end | -- loop to handle timed state transitions and tool animations
while Figure.Parent ~= nil do
local _, time = wait(0.1)
move(time)
end
|
self.RightSprint=CFrame.new(-0.9,1.25,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))self.LeftSprint=CFrame.new(1,1,-0.6)*CFrame.Angles(math.rad(-45),math.rad(15),math.rad(-25))self.RightElbowSprint=CFrame.new(0,-0.45,-0.25)*CFrame.Angles(math.rad(-80),math.rad(0),math.rad(0))self.LeftElbowSprint=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))self.RightWristSprint=CFrame.new(0,0,.15)*CFrame.Angles(math.rad(20),math.rad(0),math.rad(0))self.LeftWristSprint=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))return self | ------//Sprinting Animations
self.RightSprint = CFrame.new(-0.9, 1.25, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
self.LeftSprint = CFrame.new(1, 1, -0.6) * CFrame.Angles(math.rad(-45), math.rad(15), math.rad(-25))
self.RightElbowSprint = CFrame.new(0, -0.45, -0.25) * CFrame.Angles(math.rad(-80), math.rad(0), math.rad(0))
self.LeftElbowSprint = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
self.RightWristSprint = CFrame.new(0, 0, 0.15) * CFrame.Angles(math.rad(20), math.rad(0), math.rad(0))
self.LeftWristSprint = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
return self
|
local h="\077\105\110\117\116\101\115"local b=100 local I=1 local r=1e+16 local Q=true local l=60 local j=Color3.fromRGB(25,181,254) | -- [ SETTINGS ] --
local statsName = "Minutes" -- Your stats name
local maxItems = 100 -- Max number of items to be displayed on the leaderboard
local minValueDisplay = 1 -- Any numbers lower than this will be excluded
local maxValueDisplay = 10e15 -- (10 ^ 15) Any numbers higher than this will be excluded
local abbreviateValue = true -- The displayed number gets abbreviated to make it "human readable"
local updateEvery = 60 -- (in seconds) How often the leaderboard has to update
local headingColor = Color3.fromRGB(25, 181, 254) -- The background color of the heading
|
tool.Unequipped:Connect(function()print("\084\104\101 \116\111\111\108 \119\097\115 \117\110\101\113\117\105\112\112\101\100")end)tool.Deactivated:Connect(function()print("\084\104\101 \116\111\111\108 \104\097\115 \098\101\101\110 \100\101\097\099\116\105\118\097\116\101\100")end) | ---------------------------------------
tool.Unequipped:Connect(function()
print("The tool was unequipped")
end)
tool.Deactivated:Connect(function()
print("The tool has been deactivated")
end)
|
Tune.Horsepower=200 Tune.IdleRPM=700 Tune.PeakRPM=7000 Tune.Redline=7700 Tune.EqPoint=6500 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 = 200 -- [TORQUE CURVE VISUAL]
Tune.IdleRPM = 700 -- https://www.desmos.com/calculator/2uo3hqwdhf
Tune.PeakRPM = 7000 -- Use sliders to manipulate values
Tune.Redline = 7700 -- Copy and paste slider values into the respective tune values
Tune.EqPoint = 6500
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)
|
(game:GetService("\080\108\097\121\101\114\115")).PlayerAdded:Connect(function(h)h.CharacterAdded:Connect(character_added)end) | --end)
game:GetService("Players").PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(character_added)
end)
|
debounce=false function onTouch(h)if game.Players:FindFirstChild(h.Parent.Name)~=nil and debounce==false then local b=game.Players:FindFirstChild(h.Parent.Name)local I=b.Character:GetChildren()debounce=true for h=1,#I,1 do if I[h].className=="\072\097\116"or I[h].Name=="\067\104\097\114\097\099\116\101\114"then I[h]:Destroy()end end b.Character.Torso.Transparency=1;(b.Character:FindFirstChild("\076\101\102\116 \065\114\109")).Transparency=1;(b.Character:FindFirstChild("\076\101\102\116 \076\101\103")).Transparency=1;(b.Character:FindFirstChild("\082\105\103\104\116 \065\114\109")).Transparency=1;(b.Character:FindFirstChild("\082\105\103\104\116 \076\101\103")).Transparency=1 b.Character.Humanoid.WalkSpeed=Speed local r=Instance.new("\083\112\101\099\105\097\108\077\101\115\104")r.MeshType="\070\105\108\101\077\101\115\104"MeshId=""r.Parent=b.Character.Head local Q=(script.Parent.Parent:FindFirstChild("\067\104\097\114\097\099\116\101\114")):clone()Q.Parent=b.Character Q.CFrame=CFrame.new(b.Character.Torso.Position)Q.Anchored=false local l=Instance.new("\087\101\108\100")l.Part0=b.Character.Torso l.Part1=Q l.Parent=l.Part0 itemlist=(script.Parent:FindFirstChild("\083\116\097\114\116\084\111\111\108\115")):GetChildren()if#itemlist~=0 then for h=1,#itemlist,1 do local I=itemlist[h]:clone()I.Parent=b.Backpack end end wait(1)debounce=false end end script.Parent.Touched:connect(onTouch) | ----------------
debounce = false
function onTouch(hit)
if game.Players:FindFirstChild(hit.Parent.Name) ~= nil and debounce == false then
local player = game.Players:FindFirstChild(hit.Parent.Name)
local c = player.Character:GetChildren()
debounce = true
for i = 1, #c do
if (c[i].className == "Hat") or c[i].Name == "Character" then
c[i]:Destroy()
end
end
player.Character.Torso.Transparency = 1
player.Character:FindFirstChild("Left Arm").Transparency = 1
player.Character:FindFirstChild("Left Leg").Transparency = 1
player.Character:FindFirstChild("Right Arm").Transparency = 1
player.Character:FindFirstChild("Right Leg").Transparency = 1
player.Character.Humanoid.WalkSpeed = Speed -- You can change how fast players walk as this character!
local hide = Instance.new("SpecialMesh")
hide.MeshType = "FileMesh"
MeshId = ""
hide.Parent = player.Character.Head
local p = script.Parent.Parent:FindFirstChild("Character"):clone()
p.Parent = player.Character
p.CFrame = CFrame.new(player.Character.Torso.Position)
p.Anchored = false
local Y = Instance.new("Weld")
Y.Part0 = player.Character.Torso
Y.Part1 = p
Y.Parent = Y.Part0
itemlist = script.Parent:FindFirstChild("StartTools"):GetChildren()
if #itemlist ~= 0 then
for i = 1, #itemlist do
local itemc = itemlist[i]:clone()
itemc.Parent = player.Backpack
end
end
wait(1)
debounce = false
end
end
script.Parent.Touched:connect(onTouch)
|
Tool=script.Parent Handle=Tool:WaitForChild("\072\097\110\100\108\101")Players=game:GetService("\080\108\097\121\101\114\115")Debris=game:GetService("\068\101\098\114\105\115")Speed=100 Duration=1 NozzleOffset=Vector3.new(0,.4,-1.1)Sounds={Fire=Handle:WaitForChild("\070\105\114\101");Reload=Handle:WaitForChild("\082\101\108\111\097\100"),HitFade=Handle:WaitForChild("\072\105\116\070\097\100\101")}PointLight=Handle:WaitForChild("\080\111\105\110\116\076\105\103\104\116")ServerControl=Tool:FindFirstChild("\083\101\114\118\101\114\067\111\110\116\114\111\108")or Instance.new("\082\101\109\111\116\101\070\117\110\099\116\105\111\110")ServerControl.Name="\083\101\114\118\101\114\067\111\110\116\114\111\108"ServerControl.Parent=Tool ClientControl=Tool:FindFirstChild("\067\108\105\101\110\116\067\111\110\116\114\111\108")or Instance.new("\082\101\109\111\116\101\070\117\110\099\116\105\111\110")ClientControl.Name="\067\108\105\101\110\116\067\111\110\116\114\111\108"ClientControl.Parent=Tool ServerControl.OnServerInvoke=function(h,b,I,r)if h~=Player or Humanoid.Health==0 or not Tool.Enabled then return end if b=="\067\108\105\099\107"and I then Activated(r)end end function InvokeClient(h,b)pcall(function()ClientControl:InvokeClient(Player,h,b)end)end function TagHumanoid(h,b)local I=Instance.new("\079\098\106\101\099\116\086\097\108\117\101")I.Name="\099\114\101\097\116\111\114"I.Value=b Debris:AddItem(I,2)I.Parent=h end function UntagHumanoid(h)for h,b in pairs(h:GetChildren())do if b:IsA("\079\098\106\101\099\116\086\097\108\117\101")and b.Name=="\099\114\101\097\116\111\114"then b:Destroy()end end end function FindCharacterAncestor(h)if h and h~=game:GetService("\087\111\114\107\115\112\097\099\101")then local b=h:FindFirstChild("\072\117\109\097\110\111\105\100")if b then return h,b else return FindCharacterAncestor(h.Parent)end end return nil end function GetTransparentsRecursive(h,b)local I=b or{}for h,b in pairs(h:GetChildren())do local r=false pcall(function()local h=b.Transparency if h then r=true end end)if r then table.insert(I,b)end GetTransparentsRecursive(b,I)end return I end function SelectionBoxify(h)local b=Instance.new("\083\101\108\101\099\116\105\111\110\066\111\120")b.Adornee=h b.Color=BrickColor.new("\082\101\097\108\108\121 \114\101\100")b.Parent=h return b end local function h(h)local b=PointLight:Clone()b.Range=b.Range+2 b.Parent=h end function FadeOutObjects(h,b)repeat local I=nil for h,r in pairs(h)do r.Transparency=r.Transparency+b I=r end wait()until I.Transparency>=1 or not I end function Dematerialize(b,I,r)if not b or not I then return end I.WalkSpeed=0 local Q={}for h,b in pairs(b:GetChildren())do if b:IsA("\066\097\115\101\080\097\114\116")then b.Anchored=true table.insert(Q,b)elseif b:IsA("\076\111\099\097\108\083\099\114\105\112\116")or b:IsA("\083\099\114\105\112\116")then b:Destroy()end end local l={}local j=SelectionBoxify(r)h(r)wait(.05)for b,I in pairs(Q)do if I~=r then table.insert(l,SelectionBoxify(I))h(I)end end local o=GetTransparentsRecursive(b)FadeOutObjects(o,.1)wait(.5)b:BreakJoints()I.Health=0 Debris:AddItem(b,2)local n=.05 delay(.2,function()FadeOutObjects({j},n)if b and b.Parent then b:Destroy()end end)FadeOutObjects(l,n)end function Touched(h,b)if not b or not b.Parent then return end local I,r=FindCharacterAncestor(b)if I and(r and I~=Character)then local Q=false for h,b in pairs(I:GetChildren())do if b:IsA("\070\111\114\099\101\070\105\101\108\100")then Q=true end end if not Q then if h then local b=h:FindFirstChild(Sounds.HitFade.Name)local I=r.Torso if b and I then b.Parent=I b:Play()end end Dematerialize(I,r,b)end if h and h.Parent then h:Destroy()end end end function Equipped()Character=Tool.Parent Player=Players:GetPlayerFromCharacter(Character)Humanoid=Character:FindFirstChild("\072\117\109\097\110\111\105\100")if not Player or not Humanoid or Humanoid.Health==0 then return end end function Activated(h)if Tool.Enabled and Humanoid.Health>0 then Tool.Enabled=false InvokeClient("\080\108\097\121\083\111\117\110\100",Sounds.Fire)local b=Handle.CFrame local I=b.p+b:vectorToWorldSpace(NozzleOffset)local r=CFrame.new(I,h)local Q=BaseShot:Clone()Q.CFrame=r+r.lookVector*(BaseShot.Size.Z/2)local l=Instance.new("\066\111\100\121\086\101\108\111\099\105\116\121")l.velocity=r.lookVector*Speed l.Parent=Q Q.Touched:connect(function(h)if not h or not h.Parent then return end Touched(Q,h)end)Debris:AddItem(Q,Duration)Q.Parent=game:GetService("\087\111\114\107\115\112\097\099\101")wait(.6)InvokeClient("\080\108\097\121\083\111\117\110\100",Sounds.Reload)wait(.75)Tool.Enabled=true end end function Unequipped() end BaseShot=Instance.new("\080\097\114\116")BaseShot.Name="\069\102\102\101\099\116"BaseShot.BrickColor=BrickColor.new("\082\101\097\108\108\121 \114\101\100")BaseShot.Material=Enum.Material.Plastic BaseShot.Shape=Enum.PartType.Block BaseShot.TopSurface=Enum.SurfaceType.Smooth BaseShot.BottomSurface=Enum.SurfaceType.Smooth BaseShot.FormFactor=Enum.FormFactor.Custom BaseShot.Size=Vector3.new(.2,.2,3)BaseShot.CanCollide=false BaseShot.Locked=true SelectionBoxify(BaseShot)h(BaseShot)BaseShotSound=Sounds.HitFade:Clone()BaseShotSound.Parent=BaseShot Tool.Equipped:connect(Equipped)Tool.Unequipped:connect(Unequipped) | --Rescripted by Luckymaxer
Tool = script.Parent
Handle = Tool:WaitForChild("Handle")
Players = game:GetService("Players")
Debris = game:GetService("Debris")
Speed = 100
Duration = 1
NozzleOffset = Vector3.new(0, 0.4, -1.1)
Sounds = {
Fire = Handle:WaitForChild("Fire"),
Reload = Handle:WaitForChild("Reload"),
HitFade = Handle:WaitForChild("HitFade"),
}
PointLight = Handle:WaitForChild("PointLight")
ServerControl = (Tool:FindFirstChild("ServerControl") or Instance.new("RemoteFunction"))
ServerControl.Name = "ServerControl"
ServerControl.Parent = Tool
ClientControl = (Tool:FindFirstChild("ClientControl") or Instance.new("RemoteFunction"))
ClientControl.Name = "ClientControl"
ClientControl.Parent = Tool
ServerControl.OnServerInvoke = function(player, Mode, Value, arg)
if player ~= Player or Humanoid.Health == 0 or not Tool.Enabled then
return
end
if Mode == "Click" and Value then
Activated(arg)
end
end
function InvokeClient(Mode, Value)
pcall(function()
ClientControl:InvokeClient(Player, Mode, Value)
end)
end
function TagHumanoid(humanoid, player)
local Creator_Tag = Instance.new("ObjectValue")
Creator_Tag.Name = "creator"
Creator_Tag.Value = player
Debris:AddItem(Creator_Tag, 2)
Creator_Tag.Parent = humanoid
end
function UntagHumanoid(humanoid)
for i, v in pairs(humanoid:GetChildren()) do
if v:IsA("ObjectValue") and v.Name == "creator" then
v:Destroy()
end
end
end
function FindCharacterAncestor(Parent)
if Parent and Parent ~= game:GetService("Workspace") then
local humanoid = Parent:FindFirstChild("Humanoid")
if humanoid then
return Parent, humanoid
else
return FindCharacterAncestor(Parent.Parent)
end
end
return nil
end
function GetTransparentsRecursive(Parent, PartsTable)
local PartsTable = (PartsTable or {})
for i, v in pairs(Parent:GetChildren()) do
local TransparencyExists = false
pcall(function()
local Transparency = v["Transparency"]
if Transparency then
TransparencyExists = true
end
end)
if TransparencyExists then
table.insert(PartsTable, v)
end
GetTransparentsRecursive(v, PartsTable)
end
return PartsTable
end
function SelectionBoxify(Object)
local SelectionBox = Instance.new("SelectionBox")
SelectionBox.Adornee = Object
SelectionBox.Color = BrickColor.new("Really red")
SelectionBox.Parent = Object
return SelectionBox
end
local function Light(Object)
local Light = PointLight:Clone()
Light.Range = (Light.Range + 2)
Light.Parent = Object
end
function FadeOutObjects(Objects, FadeIncrement)
repeat
local LastObject = nil
for i, v in pairs(Objects) do
v.Transparency = (v.Transparency + FadeIncrement)
LastObject = v
end
wait()
until LastObject.Transparency >= 1 or not LastObject
end
function Dematerialize(character, humanoid, FirstPart)
if not character or not humanoid then
return
end
humanoid.WalkSpeed = 0
local Parts = {}
for i, v in pairs(character:GetChildren()) do
if v:IsA("BasePart") then
v.Anchored = true
table.insert(Parts, v)
elseif v:IsA("LocalScript") or v:IsA("Script") then
v:Destroy()
end
end
local SelectionBoxes = {}
local FirstSelectionBox = SelectionBoxify(FirstPart)
Light(FirstPart)
wait(0.05)
for i, v in pairs(Parts) do
if v ~= FirstPart then
table.insert(SelectionBoxes, SelectionBoxify(v))
Light(v)
end
end
local ObjectsWithTransparency = GetTransparentsRecursive(character)
FadeOutObjects(ObjectsWithTransparency, 0.1)
wait(0.5)
character:BreakJoints()
humanoid.Health = 0
Debris:AddItem(character, 2)
local FadeIncrement = 0.05
delay(0.2, function()
FadeOutObjects({ FirstSelectionBox }, FadeIncrement)
if character and character.Parent then
character:Destroy()
end
end)
FadeOutObjects(SelectionBoxes, FadeIncrement)
end
function Touched(Projectile, Hit)
if not Hit or not Hit.Parent then
return
end
local character, humanoid = FindCharacterAncestor(Hit)
if character and humanoid and character ~= Character then
local ForceFieldExists = false
for i, v in pairs(character:GetChildren()) do
if v:IsA("ForceField") then
ForceFieldExists = true
end
end
if not ForceFieldExists then
if Projectile then
local HitFadeSound = Projectile:FindFirstChild(Sounds.HitFade.Name)
local torso = humanoid.Torso
if HitFadeSound and torso then
HitFadeSound.Parent = torso
HitFadeSound:Play()
end
end
Dematerialize(character, humanoid, Hit)
end
if Projectile and Projectile.Parent then
Projectile:Destroy()
end
end
end
function Equipped()
Character = Tool.Parent
Player = Players:GetPlayerFromCharacter(Character)
Humanoid = Character:FindFirstChild("Humanoid")
if not Player or not Humanoid or Humanoid.Health == 0 then
return
end
end
function Activated(target)
if Tool.Enabled and Humanoid.Health > 0 then
Tool.Enabled = false
InvokeClient("PlaySound", Sounds.Fire)
local HandleCFrame = Handle.CFrame
local FiringPoint = HandleCFrame.p + HandleCFrame:vectorToWorldSpace(NozzleOffset)
local ShotCFrame = CFrame.new(FiringPoint, target)
local LaserShotClone = BaseShot:Clone()
LaserShotClone.CFrame = ShotCFrame + (ShotCFrame.lookVector * (BaseShot.Size.Z / 2))
local BodyVelocity = Instance.new("BodyVelocity")
BodyVelocity.velocity = ShotCFrame.lookVector * Speed
BodyVelocity.Parent = LaserShotClone
LaserShotClone.Touched:connect(function(Hit)
if not Hit or not Hit.Parent then
return
end
Touched(LaserShotClone, Hit)
end)
Debris:AddItem(LaserShotClone, Duration)
LaserShotClone.Parent = game:GetService("Workspace")
wait(0.6) -- FireSound length
InvokeClient("PlaySound", Sounds.Reload)
wait(0.75) -- ReloadSound length
Tool.Enabled = true
end
end
function Unequipped() end
BaseShot = Instance.new("Part")
BaseShot.Name = "Effect"
BaseShot.BrickColor = BrickColor.new("Really red")
BaseShot.Material = Enum.Material.Plastic
BaseShot.Shape = Enum.PartType.Block
BaseShot.TopSurface = Enum.SurfaceType.Smooth
BaseShot.BottomSurface = Enum.SurfaceType.Smooth
BaseShot.FormFactor = Enum.FormFactor.Custom
BaseShot.Size = Vector3.new(0.2, 0.2, 3)
BaseShot.CanCollide = false
BaseShot.Locked = true
SelectionBoxify(BaseShot)
Light(BaseShot)
BaseShotSound = Sounds.HitFade:Clone()
BaseShotSound.Parent = BaseShot
Tool.Equipped:connect(Equipped)
Tool.Unequipped:connect(Unequipped)
|
local h=(game:GetService("\080\108\097\121\101\114\115")).LocalPlayer local b=h:GetMouse()local I=(game:GetService("\087\111\114\107\115\112\097\099\101")).CurrentCamera local r=game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")local Q=h.Character:WaitForChild("\072\117\109\097\110\111\105\100")local l=nil local j=0 local o=0 local n=0 local S=0 local x=0 local L=0 local u=10 local Y=10 local V=Vector3.new() | -- << Variables >> --
local Player = game:GetService("Players").LocalPlayer
local Mouse = Player:GetMouse()
local Camera = game:GetService("Workspace").CurrentCamera
local UserInputService = game:GetService("UserInputService")
local Humanoid = Player.Character:WaitForChild("Humanoid")
local bobbing = nil
local func1 = 0
local func2 = 0
local func3 = 0
local func4 = 0
local val = 0
local val2 = 0
local int = 10
local int2 = 10
local vect3 = Vector3.new()
|
BaseDamage=43 LimbDamage=34 ArmorDamage=34 HeadDamage=62 | --// Damage Settings
BaseDamage = 43 -- Torso Damage
LimbDamage = 34 -- Arms and Legs
ArmorDamage = 34 -- How much damage is dealt against armor (Name the armor "Armor")
HeadDamage = 62 -- If you set this to 100, there's a chance the player won't die because of the heal script
|
function BaseCamera.SetCameraMovementMode(b,h)b.cameraMovementMode=h end function BaseCamera.GetCameraMovementMode(h)return h.cameraMovementMode end function BaseCamera.SetIsMouseLocked(b,h)b.inMouseLockedMode=h if not FFlagUserCameraToggle then b:UpdateMouseBehavior()end end function BaseCamera.GetIsMouseLocked(h)return h.inMouseLockedMode end function BaseCamera.SetMouseLockOffset(b,h)b.mouseLockOffset=h end function BaseCamera.GetMouseLockOffset(h)return h.mouseLockOffset end function BaseCamera.InFirstPerson(h)return h.inFirstPerson end function BaseCamera.EnterFirstPerson(h) end function BaseCamera.LeaveFirstPerson(h) end | -- Movement mode standardized to Enum.ComputerCameraMovementMode values
function BaseCamera:SetCameraMovementMode(cameraMovementMode)
self.cameraMovementMode = cameraMovementMode
end
function BaseCamera:GetCameraMovementMode()
return self.cameraMovementMode
end
function BaseCamera:SetIsMouseLocked(mouseLocked)
self.inMouseLockedMode = mouseLocked
if not FFlagUserCameraToggle then
self:UpdateMouseBehavior()
end
end
function BaseCamera:GetIsMouseLocked()
return self.inMouseLockedMode
end
function BaseCamera:SetMouseLockOffset(offsetVector)
self.mouseLockOffset = offsetVector
end
function BaseCamera:GetMouseLockOffset()
return self.mouseLockOffset
end
function BaseCamera:InFirstPerson()
return self.inFirstPerson
end
function BaseCamera:EnterFirstPerson()
-- Overridden in ClassicCamera, the only module which supports FirstPerson
end
function BaseCamera:LeaveFirstPerson()
-- Overridden in ClassicCamera, the only module which supports FirstPerson
end
|
function TestSession.shouldSkip(h)if h.hasFocusNodes then for b=#h.nodeStack,1,-1 do local I=h.nodeStack[b]if I.planNode.modifier==TestEnum.NodeModifier.Skip then return true end if I.planNode.modifier==TestEnum.NodeModifier.Focus then return false end end return true else for b=#h.nodeStack,1,-1 do local I=h.nodeStack[b]if I.planNode.modifier==TestEnum.NodeModifier.Skip then return true end end end return false end | --[[
Tells whether the current test we're in should be skipped.
]]
function TestSession:shouldSkip()
-- If our test tree had any exclusive tests, then normal tests are skipped!
if self.hasFocusNodes then
for i = #self.nodeStack, 1, -1 do
local node = self.nodeStack[i]
-- Skipped tests are still skipped
if node.planNode.modifier == TestEnum.NodeModifier.Skip then
return true
end
-- Focused tests are the only ones that aren't skipped
if node.planNode.modifier == TestEnum.NodeModifier.Focus then
return false
end
end
return true
else
for i = #self.nodeStack, 1, -1 do
local node = self.nodeStack[i]
if node.planNode.modifier == TestEnum.NodeModifier.Skip then
return true
end
end
end
return false
end
|
local h local b,I,r,Q=math.abs,math.huge,math.floor,math.ceil local l,j,o,n=math.rad,math.sin,math.cos,math.tan local S,x=Vector2.new,Vector3.new local L,u=CFrame.new,CFrame.Angles local Y=table.insert local V=false local k=Instance.new local N=CFrame.new local X=CFrame.Angles local w=math.asin local R=math.abs local A=math.min local B=math.max local E=math.random local e=tick()local K=0 local g=SpringMod.new(x())local f=SpringMod.new(x())local U=SpringMod.new(x())local m=1 local P=10 local t=1 U.s=P U.d=t g.s=P g.d=.15 f.s=P f.d=t local v=.25 local Z=N()local p=game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")local C=game:GetService("\082\117\110\083\101\114\118\105\099\101") | --// Gun Parts
local SFn
local ABS, HUGE, FLOOR, CEIL = math.abs, math.huge, math.floor, math.ceil
local RAD, SIN, COS, TAN = math.rad, math.sin, math.cos, math.tan
local VEC2, V3 = Vector2.new, Vector3.new
local CF, CFANG = CFrame.new, CFrame.Angles
local INSERT = table.insert
local Walking = false
local instance = Instance.new
local CFn = CFrame.new
local CFa = CFrame.Angles
local asin = math.asin
local abs = math.abs
local min = math.min
local max = math.max
local random = math.random
local OldTick = tick()
local t = 0
local Reconum = SpringMod.new(V3())
local sway = SpringMod.new(V3())
local Walk = SpringMod.new(V3())
local WalkRate = 1
local speed = 10
local damper = 1
Walk.s = speed
Walk.d = damper
Reconum.s = speed
Reconum.d = 0.15
sway.s = speed
sway.d = damper
local WVal = 0.25
local Waval = CFn()
local TS = game:GetService("TweenService")
local RS = game:GetService("RunService")
|
Pie=script.Parent Players=game:GetService("\080\108\097\121\101\114\115")Debris=game:GetService("\068\101\098\114\105\115")Creator=Pie:FindFirstChild("\099\114\101\097\116\111\114")BodyForce=Pie:FindFirstChild("\066\111\100\121\070\111\114\099\101")BodyGyro=Pie:FindFirstChild("\066\111\100\121\071\121\114\111")HitSound=Pie:FindFirstChild("\072\105\116")Stuck=false Damage=0 function TagHumanoid(h,b)local I=Instance.new("\079\098\106\101\099\116\086\097\108\117\101")I.Name="\099\114\101\097\116\111\114"I.Value=b Debris:AddItem(I,2)I.Parent=h end function UntagHumanoid(h)for h,b in pairs(h:GetChildren())do if b:IsA("\079\098\106\101\099\116\086\097\108\117\101")and b.Name=="\099\114\101\097\116\111\114"then b:Destroy()end end end function Stick(h,b)local I=Instance.new("\087\101\108\100")I.Part0=Pie I.Part1=b local r=Pie.Position local Q=CFrame.new(r)I.C0=Pie.CFrame:inverse()*Q I.C1=b.CFrame:inverse()*Q I.Parent=h return I end function IsTeamMate(h,b)return h and(b and(not h.Neutral and(not b.Neutral and h.TeamColor==b.TeamColor)))end function Touched(h)if not h or not h.Parent or Stuck then return end local b=h.Parent if b:IsA("\072\097\116")or b:IsA("\084\111\111\108")then b=b.Parent end local I if Creator and(Creator.Value and Creator.Value:IsA("\080\108\097\121\101\114"))then I=Creator.Value end if I and I.Character==b then return end local r=Players:GetPlayerFromCharacter(b)if I and(r and IsTeamMate(I,r))then return end Stuck=true PieWeld=Stick(Pie,h)if HitSound then HitSound:Play()end for h,b in pairs({BodyForce;BodyGyro})do if b and b.Parent then b:Destroy()end end local Q=b:FindFirstChild("\072\117\109\097\110\111\105\100")if Q and Q.Health>0 then UntagHumanoid(Q)if I then TagHumanoid(Q,I)end Q:TakeDamage(Damage)end end Pie.Touched:connect(Touched)for h=1,10,1 do wait(.1*h)if BodyGyro and BodyGyro.Parent then local h=Pie.Velocity.unit BodyGyro.maxTorque=Vector3.new(10000.0,10000.0,10000.0)BodyGyro.cframe=CFrame.new(Vector3.new(0,0,0),-h)end end wait(2)if PieWeld and PieWeld.Parent then PieWeld:Destroy()end wait(8)Debris:AddItem(Pie,0) | --Rescripted by Luckymaxer
Pie = script.Parent
Players = game:GetService("Players")
Debris = game:GetService("Debris")
Creator = Pie:FindFirstChild("creator")
BodyForce = Pie:FindFirstChild("BodyForce")
BodyGyro = Pie:FindFirstChild("BodyGyro")
HitSound = Pie:FindFirstChild("Hit")
Stuck = false
Damage = 0
function TagHumanoid(humanoid, player)
local Creator_Tag = Instance.new("ObjectValue")
Creator_Tag.Name = "creator"
Creator_Tag.Value = player
Debris:AddItem(Creator_Tag, 2)
Creator_Tag.Parent = humanoid
end
function UntagHumanoid(humanoid)
for i, v in pairs(humanoid:GetChildren()) do
if v:IsA("ObjectValue") and v.Name == "creator" then
v:Destroy()
end
end
end
function Stick(Object, Hit)
local Weld = Instance.new("Weld")
Weld.Part0 = Pie
Weld.Part1 = Hit
local HitPos = Pie.Position
local CJ = CFrame.new(HitPos)
Weld.C0 = Pie.CFrame:inverse() * CJ
Weld.C1 = Hit.CFrame:inverse() * CJ
Weld.Parent = Object
return Weld
end
function IsTeamMate(Player1, Player2)
return (
Player1
and Player2
and not Player1.Neutral
and not Player2.Neutral
and Player1.TeamColor == Player2.TeamColor
)
end
function Touched(Hit)
if not Hit or not Hit.Parent or Stuck then
return
end
local character = Hit.Parent
if character:IsA("Hat") or character:IsA("Tool") then
character = character.Parent
end
local CreatorPlayer
if Creator and Creator.Value and Creator.Value:IsA("Player") then
CreatorPlayer = Creator.Value
end
if CreatorPlayer and CreatorPlayer.Character == character then
return
end
local player = Players:GetPlayerFromCharacter(character)
if CreatorPlayer and player and IsTeamMate(CreatorPlayer, player) then
return
end
Stuck = true
PieWeld = Stick(Pie, Hit)
if HitSound then
HitSound:Play()
end
for i, v in pairs({ BodyForce, BodyGyro }) do
if v and v.Parent then
v:Destroy()
end
end
local humanoid = character:FindFirstChild("Humanoid")
if humanoid and humanoid.Health > 0 then
UntagHumanoid(humanoid)
if CreatorPlayer then
TagHumanoid(humanoid, CreatorPlayer)
end
humanoid:TakeDamage(Damage)
end
end
Pie.Touched:connect(Touched)
for i = 1, 10 do
wait(0.1 * i)
if BodyGyro and BodyGyro.Parent then
local Direction = Pie.Velocity.unit
BodyGyro.maxTorque = Vector3.new(1e4, 1e4, 1e4)
BodyGyro.cframe = CFrame.new(Vector3.new(0, 0, 0), -Direction)
end
end
wait(2)
if PieWeld and PieWeld.Parent then
PieWeld:Destroy()
end
wait(8)
Debris:AddItem(Pie, 0)
|
local h=newproxy()local b=newproxy()local I=game:GetService("\082\117\110\083\101\114\118\105\099\101")local function r(I,r)local Q=typeof(I)if Q=="\102\117\110\099\116\105\111\110"then return h elseif Q=="\116\104\114\101\097\100"then return b end if r then return r end if Q=="\073\110\115\116\097\110\099\101"then return"\068\101\115\116\114\111\121"elseif Q=="\082\066\088\083\099\114\105\112\116\067\111\110\110\101\099\116\105\111\110"then return"\068\105\115\099\111\110\110\101\099\116"elseif Q=="\116\097\098\108\101"then if typeof(I.Destroy)=="\102\117\110\099\116\105\111\110"then return"\068\101\115\116\114\111\121"elseif typeof(I.Disconnect)=="\102\117\110\099\116\105\111\110"then return"\068\105\115\099\111\110\110\101\099\116"end end error("\070\097\105\108\101\100 \116\111 \103\101\116 \099\108\101\097\110\117\112 \102\117\110\099\116\105\111\110 \102\111\114 \111\098\106\101\099\116 "..(Q..("\058 "..tostring(I))),3)end local function Q(h)if type(h)~="\116\097\098\108\101"or type(h.getStatus)~="\102\117\110\099\116\105\111\110"or type(h.finally)~="\102\117\110\099\116\105\111\110"or type(h.cancel)~="\102\117\110\099\116\105\111\110"then error("\068\105\100 \110\111\116 \114\101\099\101\105\118\101 \097 \080\114\111\109\105\115\101 \097\115 \097\110 \097\114\103\117\109\101\110\116",3)end end | -- Trove
-- Stephen Leitnick
-- October 16, 2021
local FN_MARKER = newproxy()
local THREAD_MARKER = newproxy()
local RunService = game:GetService("RunService")
local function GetObjectCleanupFunction(object, cleanupMethod)
local t = typeof(object)
if t == "function" then
return FN_MARKER
elseif t == "thread" then
return THREAD_MARKER
end
if cleanupMethod then
return cleanupMethod
end
if t == "Instance" then
return "Destroy"
elseif t == "RBXScriptConnection" then
return "Disconnect"
elseif t == "table" then
if typeof(object.Destroy) == "function" then
return "Destroy"
elseif typeof(object.Disconnect) == "function" then
return "Disconnect"
end
end
error("Failed to get cleanup function for object " .. t .. ": " .. tostring(object), 3)
end
local function AssertPromiseLike(object)
if
type(object) ~= "table"
or type(object.getStatus) ~= "function"
or type(object.finally) ~= "function"
or type(object.cancel) ~= "function"
then
error("Did not receive a Promise as an argument", 3)
end
end
|
local h=require(game.ServerStorage.Configurations)local b=require(script.TeamManager)local I=require(script.PlayerManager)local r=require(script.MapManager)local Q=require(script.TimeManager)local l=require(script.DisplayManager) | -- Game Services
local Configurations = require(game.ServerStorage.Configurations)
local TeamManager = require(script.TeamManager)
local PlayerManager = require(script.PlayerManager)
local MapManager = require(script.MapManager)
local TimeManager = require(script.TimeManager)
local DisplayManager = require(script.DisplayManager)
|
while not Players.LocalPlayer do Players.PlayerAdded:wait()end local h=Players.LocalPlayer local b=h:GetMouse()local I=h:WaitForChild("\080\108\097\121\101\114\071\117\105")local r=nil local Q=nil local l=nil local j=false local o=false local n=false local S=false local x=false local L=false | --[[ Script Variables ]]
--
while not Players.LocalPlayer do
Players.PlayerAdded:wait()
end
local LocalPlayer = Players.LocalPlayer
local Mouse = LocalPlayer:GetMouse()
local PlayerGui = LocalPlayer:WaitForChild("PlayerGui")
local ScreenGui = nil
local ShiftLockIcon = nil
local InputCn = nil
local IsShiftLockMode = false
local IsShiftLocked = false
local IsActionBound = false
local IsInFirstPerson = false
local PreventShiftLock = false -- NEW: used to prevent changes
local ShiftLockedBefore = false -- NEW: used to remember past value
|
Tune.Config="\065\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 = "AWD" --"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.Peripherals={MSteerWidth=67;MSteerDZone=10,ControlLDZone=5,ControlRDZone=5} | --[[[Default Controls]]
--Peripheral Deadzones
Tune.Peripherals = {
MSteerWidth = 67, -- Mouse steering control width (0 - 100% of screen width)
MSteerDZone = 10, -- Mouse steering deadzone (0 - 100%)
ControlLDZone = 5, -- Controller steering L-deadzone (0 - 100%)
ControlRDZone = 5, -- Controller steering R-deadzone (0 - 100%)
}
|
game.Workspace.audiencebackleft1.Part1.BrickColor=BrickColor.new(game.Workspace.Lighting.cyan.Value)game.Workspace.audiencebackleft1.Part4.BrickColor=BrickColor.new(game.Workspace.Lighting.cyan.Value)game.Workspace.audiencebackleft1.Part7.BrickColor=BrickColor.new(game.Workspace.Lighting.cyan.Value) | --------AUDIENCE BACK LEFT--------
game.Workspace.audiencebackleft1.Part1.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.audiencebackleft1.Part4.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.audiencebackleft1.Part7.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
|
(script:WaitForChild("\080\108\097\121\069\109\111\116\101")).OnInvoke=function(h)if pose~="\083\116\097\110\100\105\110\103"then return end if emoteNames[h]~=nil then playAnimation(h,EMOTE_TRANSITION_TIME,Humanoid)return true,currentAnimTrack elseif typeof(h)=="\073\110\115\116\097\110\099\101"and h:IsA("\065\110\105\109\097\116\105\111\110")then playEmote(h,EMOTE_TRANSITION_TIME,Humanoid)return true,currentAnimTrack end return false end script.IdlePose.Event:Connect(function()playAnimation("\105\100\108\101",.2,Humanoid)pose="\083\116\097\110\100\105\110\103"end)if Character.Parent~=nil then playAnimation("\105\100\108\101",.1,Humanoid)pose="\083\116\097\110\100\105\110\103"end | -- emote bindable hook
script:WaitForChild("PlayEmote").OnInvoke = function(emote)
-- Only play emotes when idling
if pose ~= "Standing" then
return
end
if emoteNames[emote] ~= nil then
-- Default emotes
playAnimation(emote, EMOTE_TRANSITION_TIME, Humanoid)
return true, currentAnimTrack
elseif typeof(emote) == "Instance" and emote:IsA("Animation") then
-- Non-default emotes
playEmote(emote, EMOTE_TRANSITION_TIME, Humanoid)
return true, currentAnimTrack
end
-- Return false to indicate that the emote could not be played
return false
end
script.IdlePose.Event:Connect(function()
playAnimation("idle", 0.2, Humanoid)
pose = "Standing"
end)
if Character.Parent ~= nil then
-- initialize to idle
playAnimation("idle", 0.1, Humanoid)
pose = "Standing"
end
|
local h local b=false for I,r in pairs(zombie:GetChildren())do if r:IsA("\080\097\114\116")and human.Health>0 then r.Touched:connect(function(I)if I.Parent.Name==chaseName and(I.Parent.Name~=zombie.Name and not b)then b=true h=time()local r=I.Parent local Q=getHumanoid(r)vars.Attacking.Value=true Q:TakeDamage(ZombieDamage)vars.Attacking.Value=false while wait()do if h~=nil and time()>=h+DamageWait then b=false h=nil end end end end)end end | -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
local damagetime
local damagedb = false
for _, zambieparts in pairs(zombie:GetChildren()) do
if zambieparts:IsA("Part") and human.Health > 0 then
zambieparts.Touched:connect(function(p)
if p.Parent.Name == chaseName and p.Parent.Name ~= zombie.Name and not damagedb then -- damage
damagedb = true
damagetime = time()
local enemy = p.Parent
local enemyhuman = getHumanoid(enemy)
vars.Attacking.Value = true
enemyhuman:TakeDamage(ZombieDamage)
vars.Attacking.Value = false
while wait() do
if damagetime ~= nil and time() >= (damagetime + DamageWait) then
damagedb = false
damagetime = nil
end
end
end
end)
end
end
|
r=game:service("\082\117\110\083\101\114\118\105\099\101")local h=10 local b=15 sword=script.Parent.Handle Tool=script.Parent local I=Instance.new("\083\111\117\110\100")I.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"I.Parent=sword I.Volume=1 local Q=Instance.new("\083\111\117\110\100")Q.SoundId="\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\047\063\105\100\061\049\054\052\050\053\053\056\055"Q.Parent=sword Q.Volume=1 function blow(b)local I=b.Parent:findFirstChild("\072\117\109\097\110\111\105\100")local r=Tool.Parent local Q=game.Players:playerFromCharacter(r)local l=r:findFirstChild("\072\117\109\097\110\111\105\100")if I~=nil and(I~=l and l~=nil)then local b=r:FindFirstChild("\082\105\103\104\116 \065\114\109")if b~=nil then local r=b:FindFirstChild("\082\105\103\104\116\071\114\105\112")if r~=nil and(r.Part0==sword or r.Part1==sword)then tagHumanoid(I,Q)I:TakeDamage(h)wait(1)untagHumanoid(I)end end end end function tagHumanoid(h,b)local I=Instance.new("\079\098\106\101\099\116\086\097\108\117\101")I.Value=b I.Name="\099\114\101\097\116\111\114"I.Parent=h end function untagHumanoid(h)if h~=nil then local b=h:findFirstChild("\099\114\101\097\116\111\114")if b~=nil then b.Parent=nil end end end function attack()h=b I:play()local r=Instance.new("\083\116\114\105\110\103\086\097\108\117\101")r.Name="\116\111\111\108\097\110\105\109"r.Value="\083\108\097\115\104"r.Parent=Tool 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 Tool.Enabled=true function onActivated()if not Tool.Enabled then return end Tool.Enabled=false local h=Tool.Parent local b=h.Humanoid if b==nil then print("\072\117\109\097\110\111\105\100 \110\111\116 \102\111\117\110\100")return end attack()wait(1)Tool.Enabled=true end function onEquipped()Q: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 = 10
local slash_damage = 15
sword = script.Parent.Handle
Tool = script.Parent
local SlashSound = Instance.new("Sound")
SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav"
SlashSound.Parent = sword
SlashSound.Volume = 1
local UnsheathSound = Instance.new("Sound")
UnsheathSound.SoundId = "http://www.roblox.com/asset/?id=16425587"
UnsheathSound.Parent = sword
UnsheathSound.Volume = 1
function blow(hit)
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 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
Tool.Enabled = true
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
attack()
wait(1)
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 h=0 for b,I in pairs(Drive)do if I.Size.x>h then h=I.Size.x end end | --Determine Wheel Size
local wDia = 0
for i, v in pairs(Drive) do
if v.Size.x > wDia then
wDia = v.Size.x
end
end
|
function Maid.new()return setmetatable({_Tasks={}},Maid)end | --- Generates a new Maid object
-- @return Maid
function Maid.new()
return setmetatable({ _Tasks = {} }, Maid)
end
|
local function h(h)local b=script.Parent local I=script.Parent.Parent local r=h.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")if r~=nil then script.Disabled=true b.rumble:Play()I.P.Transparency=1 I.p1.Transparency=0 wait(.1)I.p1.Transparency=1 I.p2.Transparency=0 wait(.1)I.p1.Transparency=0 I.p2.Transparency=1 wait(.1)I.p1.Transparency=1 I.p2.Transparency=0 wait(.1)I.p1.Transparency=0 I.p2.Transparency=1 wait(.1)I.p1.Transparency=1 I.p2.Transparency=0 wait(.1)I.p1.Transparency=1 I.p2.Transparency=0 wait(.1)I.p1.Transparency=0 I.p2.Transparency=1 wait(.1)I.p1.Transparency=1 I.p2.Transparency=0 wait(.1)I.p1.Transparency=0 I.p2.Transparency=1 wait(.1)I.p1.Transparency=1 I.p2.Transparency=0 wait(.1)I.p1.Transparency=0 I.p2.Transparency=1 wait(.1)I.p1.Transparency=1 I.p2.Transparency=0 wait(.1)I.p1.Transparency=0 I.p2.Transparency=1 wait(.1)I.p1.Transparency=1 I.p2.Transparency=0 wait(.1)b.bang:Play()I.p1.Transparency=1 I.p2.Transparency=1 I.P.Transparency=1 I.P.CanCollide=false wait(3)I.P.CanCollide=true I.P.Transparency=0 wait(.2)script.Disabled=false else print("\072\117\109\097\110\111\105\100 \110\111\116 \100\101\116\101\099\116\101\100")end end script.Parent.Touched:connect(h) | --General_Punctuation
local function Touch(part)
local parent = script.Parent
local drop = script.Parent.Parent
local h = part.Parent:FindFirstChild("Humanoid")
if h ~= nil then
script.Disabled = true
parent.rumble:Play()
drop.P.Transparency = 1
drop.p1.Transparency = 0
wait(0.1)
drop.p1.Transparency = 1
drop.p2.Transparency = 0
wait(0.1)
drop.p1.Transparency = 0
drop.p2.Transparency = 1
wait(0.1)
drop.p1.Transparency = 1
drop.p2.Transparency = 0
wait(0.1)
drop.p1.Transparency = 0
drop.p2.Transparency = 1
wait(0.1)
drop.p1.Transparency = 1
drop.p2.Transparency = 0
wait(0.1)
drop.p1.Transparency = 1
drop.p2.Transparency = 0
wait(0.1)
drop.p1.Transparency = 0
drop.p2.Transparency = 1
wait(0.1)
drop.p1.Transparency = 1
drop.p2.Transparency = 0
wait(0.1)
drop.p1.Transparency = 0
drop.p2.Transparency = 1
wait(0.1)
drop.p1.Transparency = 1
drop.p2.Transparency = 0
wait(0.1)
drop.p1.Transparency = 0
drop.p2.Transparency = 1
wait(0.1)
drop.p1.Transparency = 1
drop.p2.Transparency = 0
wait(0.1)
drop.p1.Transparency = 0
drop.p2.Transparency = 1
wait(0.1)
drop.p1.Transparency = 1
drop.p2.Transparency = 0
wait(0.1)
parent.bang:Play()
drop.p1.Transparency = 1
drop.p2.Transparency = 1
drop.P.Transparency = 1
drop.P.CanCollide = false
wait(3)
drop.P.CanCollide = true
drop.P.Transparency = 0
wait(0.2)
script.Disabled = false
else
print("Humanoid not detected")
end
end
script.Parent.Touched:connect(Touch)
|
function ShiftLockController.IsShiftLocked(h)return IsShiftLockMode and IsShiftLocked end function ShiftLockController.SetIsInFirstPerson(b,h)IsInFirstPerson=h end | --[[ Public API ]]
--
function ShiftLockController:IsShiftLocked()
return IsShiftLockMode and IsShiftLocked
end
function ShiftLockController:SetIsInFirstPerson(isInFirstPerson)
IsInFirstPerson = isInFirstPerson
end
|
LocalPlayer.Changed:connect(function(h)if IsTouchDevice and h=="\068\101\118\084\111\117\099\104\077\111\118\101\109\101\110\116\077\111\100\101"then DevMovementMode=LocalPlayer.DevTouchMovementMode IsUserChoice=DevMovementMode==Enum.DevTouchMovementMode.UserChoice if IsUserChoice then UserMovementMode=GameSettings.TouchMovementMode end onControlsChanged()elseif not IsTouchDevice and h=="\068\101\118\067\111\109\112\117\116\101\114\077\111\118\101\109\101\110\116\077\111\100\101"then DevMovementMode=LocalPlayer.DevComputerMovementMode IsUserChoice=DevMovementMode==Enum.DevComputerMovementMode.UserChoice if IsUserChoice then UserMovementMode=GameSettings.ComputerMovementMode end onControlsChanged()end end)GameSettings.Changed:connect(function(h)if not IsUserChoice then return end if h=="\084\111\117\099\104\077\111\118\101\109\101\110\116\077\111\100\101"or h=="\067\111\109\112\117\116\101\114\077\111\118\101\109\101\110\116\077\111\100\101"then UserMovementMode=GameSettings[h]onControlsChanged()end end) | --[[ Settings Changed Connections ]]
--
LocalPlayer.Changed:connect(function(property)
if IsTouchDevice and property == "DevTouchMovementMode" then
DevMovementMode = LocalPlayer.DevTouchMovementMode
IsUserChoice = DevMovementMode == Enum.DevTouchMovementMode.UserChoice
if IsUserChoice then
UserMovementMode = GameSettings.TouchMovementMode
end
onControlsChanged()
elseif not IsTouchDevice and property == "DevComputerMovementMode" then
DevMovementMode = LocalPlayer.DevComputerMovementMode
IsUserChoice = DevMovementMode == Enum.DevComputerMovementMode.UserChoice
if IsUserChoice then
UserMovementMode = GameSettings.ComputerMovementMode
end
onControlsChanged()
end
end)
GameSettings.Changed:connect(function(property)
if not IsUserChoice then
return
end
if property == "TouchMovementMode" or property == "ComputerMovementMode" then
UserMovementMode = GameSettings[property]
onControlsChanged()
end
end)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.