prompt
stringlengths 2
14.7k
| completion
stringlengths 1
99.7k
|
---|---|
-- Removes any old creator tags and applies new ones to the specified target
|
local function ApplyTags(target)
while target:FindFirstChild('creator') do
target.creator:Destroy()
end
local creatorTag = Instance.new('ObjectValue')
creatorTag.Value = Player
creatorTag.Name = 'creator' --NOTE: Must be called 'creator' for website stats
local iconTag = Instance.new('StringValue')
iconTag.Value = Tool.TextureId
iconTag.Name = 'icon'
iconTag.Parent = creatorTag
creatorTag.Parent = target
DebrisService:AddItem(creatorTag, 4)
end
|
-- Critically damped spring class for fluid motion effects
|
local Spring = {} do
Spring.__index = Spring
-- Initialize to a given undamped frequency and default position
function Spring.new(freq, pos)
return setmetatable({
freq = freq,
goal = pos,
pos = pos,
vel = 0,
}, Spring)
end
-- Advance the spring simulation by `dt` seconds
function Spring:step(dt: number)
local f: number = self.freq::number * 2.0 * math.pi
local g: Vector3 = self.goal
local p0: Vector3 = self.pos
local v0: Vector3 = self.vel
local offset = p0 - g
local decay = math.exp(-f*dt)
local p1 = (offset*(1 + f*dt) + v0*dt)*decay + g
local v1 = (v0*(1 - f*dt) - offset*(f*f*dt))*decay
self.pos = p1
self.vel = v1
return p1
end
end
CameraUtils.Spring = Spring
|
-- palys anim
|
function module.play1(anim,hum, data)
local animFold = data.Fold or rp.Storage.Animations
local speed = data.sped or nil
local animation = hum.Animator:LoadAnimation(animFold[anim])
animation:Play()
if speed ~= nil then
animation:AdjustSpeed(speed)
end
end
|
--[[Flip]]
|
function Flip()
--Detect Orientation
if (car.DriveSeat.CFrame*CFrame.Angles(math.pi/2,0,0)).lookVector.y > .1 or FlipDB then
FlipWait=tick()
--Apply Flip
else
if tick()-FlipWait>=3 then
FlipDB=true
local gyro = car.DriveSeat.Flip
gyro.maxTorque = Vector3.new(10000,0,10000)
gyro.P=3000
gyro.D=500
wait(1)
gyro.maxTorque = Vector3.new(0,0,0)
gyro.P=0
gyro.D=0
FlipDB=false
end
end
end
function AWD()
if car.DriveSeat.AWD.Value then -- SET AWD
if _Tune.Config == "FWD" or _Tune.Config == "AWD" then for i,v in pairs(car.Wheels:GetChildren()) do if v.Name=="RL" or v.Name=="RR" or v.Name=="R" then table.insert(Drive,v) end end end
else --make FWD
if _Tune.Config == "FWD" or _Tune.Config == "AWD" then for i,v in pairs(car.Wheels:GetChildren()) do if v.Name=="RL" or v.Name=="RR" or v.Name=="R" then table.remove(Drive,3) table.remove(Drive,4) end end end
end
end
car.DriveSeat.AWD.Changed:connect(function()
AWD()
end)
AWD()
|
--Handle door opening effects
|
function GetLength(t)
local l = 0
for i,v in pairs(t) do
l=l+1
end
return l
end
script.GetInStart.OnServerEvent:Connect(function(Player,Seat)
if Seat:FindFirstChild("DoorHinge") then --This bit only serves a purpose if there are doors to open/close
print("Found door hinge, opening door")
if Seat.DoorHinge.ClassName ~= "HingeConstraint" then warn("Warning, door hinge is not actually a hinge!") end
if SeatsInteractingPlayers[Seat] == nil then
SeatsInteractingPlayers[Seat] = {} --This index is removed when the seat is destroyed by the seat add code
end
--Record that a player is trying to get in the seat
SeatsInteractingPlayers[Seat][Player] = elapsedTime()
--Activate the hinge
Seat.DoorHinge.TargetAngle = 55
--If the player doesnt stop trying to get in after 3 seconds, they probably left or it broke.
wait(3)
print("Check for automatic close")
if Player.Parent ~= nil then --Player is still here, check they havent interacted again.
print("Player still here")
if SeatsInteractingPlayers[Seat][Player] then
print("Time since last interaction: "..tostring(elapsedTime() - SeatsInteractingPlayers[Seat][Player]))
if (elapsedTime() - SeatsInteractingPlayers[Seat][Player]) >=3 then --Check they havent started interacting again within 8 seconds
SeatsInteractingPlayers[Seat][Player] = nil
print("removing player")
end
end
else
SeatsInteractingPlayers[Seat][Player] = nil
end
print("Number of interacting players: "..tostring(GetLength(SeatsInteractingPlayers[Seat])))
--Check if the door should be closed
if GetLength(SeatsInteractingPlayers[Seat]) == 0 then
Seat.DoorHinge.TargetAngle = 0
end
end
end)
script.GetInEnd.OnServerEvent:Connect(function(Player,Seat)
if Seat:FindFirstChild("DoorHinge") then
if SeatsInteractingPlayers[Seat] then
SeatsInteractingPlayers[Seat][Player] = nil
--Check nobody is still trying to get in before closing
if GetLength(SeatsInteractingPlayers[Seat]) == 0 then
Seat.DoorHinge.TargetAngle = 0
end
end
end
end)
return module
|
--// Input Connections
|
L_107_.InputBegan:connect(function(L_314_arg1, L_315_arg2)
if not L_315_arg2 and L_15_ then
if L_314_arg1.UserInputType == (Enum.UserInputType.MouseButton2 or L_314_arg1.KeyCode == Enum.KeyCode.ButtonL2) and not L_79_ and not L_78_ and not L_77_ and L_24_.CanAim and not L_74_ and L_15_ and not L_66_ and not L_67_ then
if not L_64_ then
if not L_65_ then
if L_24_.TacticalModeEnabled then
L_154_ = 0.015
L_155_ = 7
L_3_:WaitForChild("Humanoid").WalkSpeed = 7
else
L_155_ = 10
L_154_ = 0.008
L_3_:WaitForChild("Humanoid").WalkSpeed = 10
end
end
if (L_3_.Head.Position - L_5_.CoordinateFrame.p).magnitude <= 2 then
L_97_ = L_50_
end
L_133_.target = L_56_.CFrame:toObjectSpace(L_44_.CFrame).p
L_115_:FireServer(true)
L_64_ = true
end
end;
if L_314_arg1.KeyCode == Enum.KeyCode.A and L_15_ then
L_134_ = CFrame.Angles(0, 0, 0.1)
end;
if L_314_arg1.KeyCode == Enum.KeyCode.D and L_15_ then
L_134_ = CFrame.Angles(0, 0, -0.1)
end;
if L_314_arg1.KeyCode == Enum.KeyCode.E and L_15_ and not L_80_ and not L_81_ then
L_80_ = true
L_82_ = false
L_81_ = true
LeanRight()
end
if L_314_arg1.KeyCode == Enum.KeyCode.Q and L_15_ and not L_80_ and not L_82_ then
L_80_ = true
L_81_ = false
L_82_ = true
LeanLeft()
end
if L_314_arg1.KeyCode == L_24_.AlternateAimKey and not L_79_ and not L_78_ and not L_77_ and L_24_.CanAim and not L_74_ and L_15_ and not L_66_ and not L_67_ then
if not L_64_ then
if not L_65_ then
L_3_.Humanoid.WalkSpeed = 10
L_155_ = 10
L_154_ = 0.008
end
L_97_ = L_50_
L_133_.target = L_56_.CFrame:toObjectSpace(L_44_.CFrame).p
L_115_:FireServer(true)
L_64_ = true
end
end;
if L_314_arg1.UserInputType == (Enum.UserInputType.MouseButton1 or L_314_arg1.KeyCode == Enum.KeyCode.ButtonR2) and not L_79_ and not L_77_ and L_69_ and L_15_ and not L_66_ and not L_67_ and not L_74_ then
L_68_ = true
if not Shooting and L_15_ and not L_83_ then
if L_103_ > 0 then
Shoot()
end
elseif not Shooting and L_15_ and L_83_ then
if L_105_ > 0 then
Shoot()
end
end
end;
if L_314_arg1.KeyCode == (L_24_.LaserKey or L_314_arg1.KeyCode == Enum.KeyCode.DPadRight) and L_15_ and L_24_.LaserAttached then
local L_316_ = L_1_:FindFirstChild("LaserLight")
L_122_.KeyDown[1].Plugin()
end;
if L_314_arg1.KeyCode == (L_24_.LightKey or L_314_arg1.KeyCode == Enum.KeyCode.ButtonR3) and L_15_ and L_24_.LightAttached then
local L_317_ = L_1_:FindFirstChild("FlashLight"):FindFirstChild('Light')
local L_318_ = false
L_317_.Enabled = not L_317_.Enabled
end;
if L_15_ and L_314_arg1.KeyCode == (L_24_.FireSelectKey or L_314_arg1.KeyCode == Enum.KeyCode.DPadUp) and not L_79_ and not L_70_ and not L_78_ then
L_70_ = true
if L_92_ == 1 then
if Shooting then
Shooting = false
end
if L_24_.AutoEnabled then
L_92_ = 2
L_83_ = false
L_69_ = L_84_
elseif not L_24_.AutoEnabled and L_24_.BurstEnabled then
L_92_ = 3
L_83_ = false
L_69_ = L_84_
elseif not L_24_.AutoEnabled and not L_24_.BurstEnabled and L_24_.BoltAction then
L_92_ = 4
L_83_ = false
L_69_ = L_84_
elseif not L_24_.AutoEnabled and not L_24_.BurstEnabled and not L_24_.BoltAction and L_24_.ExplosiveEnabled then
L_92_ = 6
L_83_ = true
L_84_ = L_69_
L_69_ = L_85_
elseif not L_24_.AutoEnabled and not L_24_.BurstEnabled and not L_24_.BoltAction and not L_24_.ExplosiveEnabled then
L_92_ = 1
L_83_ = false
L_69_ = L_84_
end
elseif L_92_ == 2 then
if Shooting then
Shooting = false
end
if L_24_.BurstEnabled then
L_92_ = 3
L_83_ = false
L_69_ = L_84_
elseif not L_24_.BurstEnabled and L_24_.BoltAction then
L_92_ = 4
L_83_ = false
L_69_ = L_84_
elseif not L_24_.BurstEnabled and not L_24_.BoltAction and L_24_.ExplosiveEnabled then
L_92_ = 6
L_83_ = true
L_84_ = L_69_
L_69_ = L_85_
elseif not L_24_.BurstEnabled and not L_24_.BoltAction and not L_24_.ExplosiveEnabled and L_24_.SemiEnabled then
L_92_ = 1
L_83_ = false
L_69_ = L_84_
elseif not L_24_.BurstEnabled and not L_24_.BoltAction and not L_24_.SemiEnabled then
L_92_ = 2
L_83_ = false
L_69_ = L_84_
end
elseif L_92_ == 3 then
if Shooting then
Shooting = false
end
if L_24_.BoltAction then
L_92_ = 4
L_83_ = false
L_69_ = L_84_
elseif not L_24_.BoltAction and L_24_.ExplosiveEnabled then
L_92_ = 6
L_83_ = true
L_84_ = L_69_
L_69_ = L_85_
elseif not L_24_.BoltAction and not L_24_.ExplosiveEnabled and L_24_.SemiEnabled then
L_92_ = 1
L_83_ = false
L_69_ = L_84_
elseif not L_24_.BoltAction and not L_24_.SemiEnabled and L_24_.AutoEnabled then
L_92_ = 2
L_83_ = false
L_69_ = L_84_
elseif not L_24_.BoltAction and not L_24_.SemiEnabled and not L_24_.AutoEnabled then
L_92_ = 3
L_83_ = false
L_69_ = L_84_
end
elseif L_92_ == 4 then
if Shooting then
Shooting = false
end
if L_24_.ExplosiveEnabled then
L_92_ = 6
L_83_ = true
L_84_ = L_69_
L_69_ = L_85_
elseif not L_24_.ExplosiveEnabled and L_24_.SemiEnabled then
L_92_ = 1
L_83_ = false
L_69_ = L_84_
elseif not L_24_.SemiEnabled and L_24_.AutoEnabled then
L_92_ = 2
L_83_ = false
L_69_ = L_84_
elseif not L_24_.SemiEnabled and not L_24_.AutoEnabled and L_24_.BurstEnabled then
L_92_ = 3
L_83_ = false
L_69_ = L_84_
elseif not L_24_.SemiEnabled and not L_24_.AutoEnabled and not L_24_.BurstEnabled then
L_92_ = 4
L_83_ = false
L_69_ = L_84_
end
elseif L_92_ == 6 then
if Shooting then
Shooting = false
end
L_85_ = L_69_
if L_24_.SemiEnabled then
L_92_ = 1
L_83_ = false
L_69_ = L_84_
elseif not L_24_.SemiEnabled and L_24_.AutoEnabled then
L_92_ = 2
L_83_ = false
L_69_ = L_84_
elseif not L_24_.SemiEnabled and not L_24_.AutoEnabled and L_24_.BurstEnabled then
L_92_ = 3
L_83_ = false
L_69_ = L_84_
elseif not L_24_.SemiEnabled and not L_24_.AutoEnabled and not L_24_.BurstEnabled and L_24_.BoltAction then
L_92_ = 4
L_83_ = false
L_69_ = L_84_
elseif not L_24_.SemiEnabled and not L_24_.AutoEnabled and not L_24_.BurstEnabled and not L_24_.BoltAction then
L_92_ = 6
L_83_ = true
L_84_ = L_69_
L_69_ = L_85_
end
end
UpdateAmmo()
FireModeAnim()
IdleAnim()
L_70_ = false
end;
if L_314_arg1.KeyCode == (Enum.KeyCode.F or L_314_arg1.KeyCode == Enum.KeyCode.DPadDown) and not L_79_ and not L_77_ and not L_78_ and not L_67_ and not L_70_ and not L_64_ and not L_66_ and not Shooting and not L_76_ then
if not L_73_ and not L_74_ then
L_74_ = true
Shooting = false
L_69_ = false
L_135_ = time()
delay(0.6, function()
if L_103_ ~= L_24_.Ammo and L_103_ > 0 then
CreateShell()
end
end)
BoltBackAnim()
L_73_ = true
elseif L_73_ and L_74_ then
BoltForwardAnim()
Shooting = false
L_69_ = true
if L_103_ ~= L_24_.Ammo and L_103_ > 0 then
L_103_ = L_103_ - 1
elseif L_103_ >= L_24_.Ammo then
L_69_ = true
end
L_73_ = false
L_74_ = false
IdleAnim()
L_75_ = false
end
UpdateAmmo()
end;
if L_314_arg1.KeyCode == (Enum.KeyCode.LeftShift or L_314_arg1.KeyCode == Enum.KeyCode.ButtonL3) and not L_78_ and not L_77_ and L_146_ then
L_71_ = true
if L_15_ and not L_70_ and not L_67_ and L_71_ and not L_65_ and not L_74_ then
Shooting = false
L_64_ = false
L_67_ = true
delay(0, function()
if L_67_ and not L_66_ then
L_64_ = false
L_72_ = true
end
end)
L_97_ = 80
if L_24_.TacticalModeEnabled then
L_154_ = 0.4
L_155_ = 16
else
L_155_ = L_24_.SprintSpeed
L_154_ = 0.4
end
L_3_.Humanoid.WalkSpeed = L_24_.SprintSpeed
end
end;
if L_314_arg1.KeyCode == (Enum.KeyCode.R or L_314_arg1.KeyCode == Enum.KeyCode.ButtonX) and not L_79_ and not L_78_ and not L_77_ and L_15_ and not L_66_ and not L_64_ and not Shooting and not L_67_ and not L_74_ then
if not L_83_ then
if L_104_ > 0 and L_103_ < L_24_.Ammo then
Shooting = false
L_66_ = true
for L_319_forvar1, L_320_forvar2 in pairs(game.Players:GetChildren()) do
if L_320_forvar2 and L_320_forvar2:IsA('Player') and L_320_forvar2 ~= L_2_ and L_320_forvar2.TeamColor == L_2_.TeamColor then
if (L_320_forvar2.Character.HumanoidRootPart.Position - L_3_.HumanoidRootPart.Position).magnitude <= 150 then
if L_7_:FindFirstChild('AHH') and not L_7_.AHH.IsPlaying then
L_119_:FireServer(L_7_.AHH, L_100_[math.random(0, 23)])
end
end
end
end
ReloadAnim()
if L_103_ <= 0 then
if not L_24_.CanSlideLock then
BoltBackAnim()
BoltForwardAnim()
end
end
IdleAnim()
L_69_ = true
if L_103_ <= 0 then
if (L_104_ - (L_24_.Ammo - L_103_)) < 0 then
L_103_ = L_103_ + L_104_
L_104_ = 0
else
L_104_ = L_104_ - (L_24_.Ammo - L_103_)
L_103_ = L_24_.Ammo
end
elseif L_103_ > 0 then
if (L_104_ - (L_24_.Ammo - L_103_)) < 0 then
L_103_ = L_103_ + L_104_ + 1
L_104_ = 0
else
L_104_ = L_104_ - (L_24_.Ammo - L_103_)
L_103_ = L_24_.Ammo + 1
end
end
L_66_ = false
if not L_75_ then
L_69_ = true
end
end;
elseif L_83_ then
if L_105_ > 0 then
Shooting = false
L_66_ = true
nadeReload()
IdleAnim()
L_66_ = false
L_69_ = true
end
end;
UpdateAmmo()
end;
if L_314_arg1.KeyCode == Enum.KeyCode.RightBracket and L_64_ then
if (L_51_ < 1) then
L_51_ = L_51_ + L_24_.SensitivityIncrement
end
end
if L_314_arg1.KeyCode == Enum.KeyCode.LeftBracket and L_64_ then
if (L_51_ > 0.1) then
L_51_ = L_51_ - L_24_.SensitivityIncrement
end
end
if L_314_arg1.KeyCode == (Enum.KeyCode.T or L_314_arg1.KeyCode == Enum.KeyCode.DPadLeft) and L_1_:FindFirstChild("AimPart2") then
if not L_86_ then
L_56_ = L_1_:WaitForChild("AimPart2")
L_50_ = L_24_.CycleAimZoom
if L_64_ then
L_97_ = L_24_.CycleAimZoom
end
L_86_ = true
else
L_56_ = L_1_:FindFirstChild("AimPart")
L_50_ = L_24_.AimZoom
if L_64_ then
L_97_ = L_24_.AimZoom
end
L_86_ = false
end;
end;
if L_314_arg1.KeyCode == L_24_.InspectionKey and not L_79_ and not L_78_ then
if not L_77_ then
L_77_ = true
InspectAnim()
IdleAnim()
L_77_ = false
end
end;
if L_314_arg1.KeyCode == L_24_.AttachmentKey and not L_79_ and not L_77_ then
if L_15_ then
if not L_78_ then
L_67_ = false
L_64_ = false
L_69_ = false
L_78_ = true
AttachAnim()
elseif L_78_ then
L_67_ = false
L_64_ = false
L_69_ = true
L_78_ = false
IdleAnim()
end
end
end;
if L_314_arg1.KeyCode == Enum.KeyCode.P and not L_77_ and not L_78_ and not L_64_ and not L_67_ and not L_65_ and not L_66_ and not Recoiling and not L_67_ then
if not L_79_ then
L_79_ = true
L_14_:Create(L_45_, TweenInfo.new(0.2), {
C1 = L_24_.SprintPos
}):Play()
wait(0.2)
L_112_:FireServer("Patrol", L_24_.SprintPos)
else
L_79_ = false
L_14_:Create(L_45_, TweenInfo.new(0.2), {
C1 = CFrame.new()
}):Play()
wait(0.2)
L_112_:FireServer("Unpatrol")
end
end;
end
end)
L_107_.InputEnded:connect(function(L_321_arg1, L_322_arg2)
if not L_322_arg2 and L_15_ then
if L_321_arg1.UserInputType == (Enum.UserInputType.MouseButton2 or L_321_arg1.KeyCode == Enum.KeyCode.ButtonL2) and not L_77_ and L_24_.CanAim and not L_78_ then
if L_64_ then
if not L_65_ then
L_3_:WaitForChild("Humanoid").WalkSpeed = 16
if L_24_.TacticalModeEnabled then
L_154_ = 0.09
L_155_ = 11
else
L_154_ = .2
L_155_ = 17
end
end
L_97_ = 70
L_133_.target = Vector3.new()
L_115_:FireServer(false)
L_64_ = false
end
end;
if L_321_arg1.KeyCode == Enum.KeyCode.A and L_15_ then
L_134_ = CFrame.Angles(0, 0, 0)
end;
if L_321_arg1.KeyCode == Enum.KeyCode.D and L_15_ then
L_134_ = CFrame.Angles(0, 0, 0)
end;
if L_321_arg1.KeyCode == Enum.KeyCode.E and L_15_ and L_80_ then
Unlean()
L_80_ = false
L_82_ = false
L_81_ = false
end
if L_321_arg1.KeyCode == Enum.KeyCode.Q and L_15_ and L_80_ then
Unlean()
L_80_ = false
L_82_ = false
L_81_ = false
end
if L_321_arg1.KeyCode == L_24_.AlternateAimKey and not L_77_ and L_24_.CanAim then
if L_64_ then
if not L_65_ then
L_3_.Humanoid.WalkSpeed = 16
L_155_ = 17
L_154_ = .25
end
L_97_ = 70
L_133_.target = Vector3.new()
L_115_:FireServer(false)
L_64_ = false
end
end;
if L_321_arg1.UserInputType == (Enum.UserInputType.MouseButton1 or L_321_arg1.KeyCode == Enum.KeyCode.ButtonR2) and not L_77_ then
L_68_ = false
if Shooting then
Shooting = false
end
end;
if L_321_arg1.KeyCode == Enum.KeyCode.E and L_15_ then
local L_323_ = L_42_:WaitForChild('GameGui')
if L_16_ then
L_323_:WaitForChild('AmmoFrame').Visible = false
L_16_ = false
end
end;
if L_321_arg1.KeyCode == (Enum.KeyCode.LeftShift or L_321_arg1.KeyCode == Enum.KeyCode.ButtonL3) and not L_77_ and not L_70_ and not L_65_ then -- SPRINT
L_71_ = false
if L_67_ and not L_64_ and not Shooting and not L_71_ then
L_67_ = false
L_72_ = false
L_97_ = 70
L_3_.Humanoid.WalkSpeed = 16
if L_24_.TacticalModeEnabled then
L_154_ = 0.09
L_155_ = 11
else
L_154_ = .2
L_155_ = 17
end
end
end;
end
end)
L_107_.InputChanged:connect(function(L_324_arg1, L_325_arg2)
if not L_325_arg2 and L_15_ and L_24_.FirstPersonOnly and L_64_ then
if L_324_arg1.UserInputType == Enum.UserInputType.MouseWheel then
if L_324_arg1.Position.Z == 1 and (L_51_ < 1) then
L_51_ = L_51_ + L_24_.SensitivityIncrement
elseif L_324_arg1.Position.Z == -1 and (L_51_ > 0.1) then
L_51_ = L_51_ - L_24_.SensitivityIncrement
end
end
end
end)
L_107_.InputChanged:connect(function(L_326_arg1, L_327_arg2)
if not L_327_arg2 and L_15_ then
local L_328_, L_329_ = workspace:FindPartOnRayWithIgnoreList(Ray.new(L_56_.CFrame.p, (L_56_.CFrame.lookVector).unit * 10000), IgnoreList);
if L_328_ then
local L_330_ = (L_329_ - L_6_.Position).magnitude
L_33_.Text = math.ceil(L_330_) .. ' m'
end
end
end)
|
-- Connect functions to events
|
Players.PlayerAdded:Connect(onPlayerAdded)
RunService.Heartbeat:Connect(onHeartbeat)
|
-------- OMG HAX
|
r = game:service("RunService")
local damage = 10
local slash_damage = 20
local lunge_damage = 40
sword = script.Parent.Handle
Tool = script.Parent
local SlashSound = Instance.new("Sound")
SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav"
SlashSound.Parent = sword
SlashSound.Volume = .7
local LungeSound = Instance.new("Sound")
LungeSound.SoundId = "rbxasset://sounds\\swordlunge.wav"
LungeSound.Parent = sword
LungeSound.Volume = .6
local UnsheathSound = Instance.new("Sound")
UnsheathSound.SoundId = "rbxasset://sounds\\unsheath.wav"
UnsheathSound.Parent = sword
UnsheathSound.Volume = 1
function blow(hit)
local humanoid = hit.Parent:findFirstChild("Humanoid")
local vCharacter = Tool.Parent
local vPlayer = game.Players:playerFromCharacter(vCharacter)
local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
if humanoid~=nil and humanoid ~= hum and hum ~= nil then
-- final check, make sure sword is in-hand
local right_arm = vCharacter:FindFirstChild("Right Arm")
if (right_arm ~= nil) then
local joint = right_arm:FindFirstChild("RightGrip")
if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then
tagHumanoid(humanoid, vPlayer)
humanoid:TakeDamage(damage)
end
end
end
end
function tagHumanoid(humanoid, player)
local creator_tag = Instance.new("ObjectValue")
creator_tag.Value = player
creator_tag.Name = "creator"
creator_tag.Parent = humanoid
game.Debris:AddItem(creator_tag, 1)
end
function attack()
damage = slash_damage
SlashSound:play()
local anim = Instance.new("StringValue")
anim.Name = "toolanim"
anim.Value = "Slash"
anim.Parent = Tool
end
function lunge()
damage = lunge_damage
LungeSound:play()
local anim = Instance.new("StringValue")
anim.Name = "toolanim"
anim.Value = "Lunge"
anim.Parent = Tool
local force = Instance.new("BodyVelocity")
force.velocity = Vector3.new(0,80,0)
force.Parent = Tool.Parent.Torso
wait(.25)
force.velocity = (Tool.Parent.Torso.CFrame.lookVector * 120) + Vector3.new(0, 60,0)
swordOut()
wait(.5)
force.Parent = nil
wait(.5)
swordUp()
damage = slash_damage
end
function swordUp()
Tool.GripForward = Vector3.new(-1,0,0)
Tool.GripRight = Vector3.new(0,1,0)
Tool.GripUp = Vector3.new(0,0,1)
end
function swordOut()
Tool.GripForward = Vector3.new(0,0,1)
Tool.GripRight = Vector3.new(0,-1,0)
Tool.GripUp = Vector3.new(-1,0,0)
end
function swordAcross()
-- parry
end
Tool.Enabled = true
local last_attack = 0
function onActivated()
if not Tool.Enabled then
return
end
Tool.Enabled = false
local character = Tool.Parent;
local humanoid = character.Humanoid
if humanoid == nil then
print("Humanoid not found")
return
end
t = r.Stepped:wait()
if (t - last_attack < .2) then
lunge()
else
attack()
end
last_attack = t
--wait(.5)
Tool.Enabled = true
end
function onEquipped()
UnsheathSound:play()
end
script.Parent.Activated:connect(onActivated)
script.Parent.Equipped:connect(onEquipped)
connection = sword.Touched:connect(blow)
|
-- Map Variables
|
local lobbySpawn = workspace.Lobby.StartSpawn
|
--[[
remoteProperty = ClientRemoteProperty.new(valueObject: Instance)
remoteProperty:Get(): any
remoteProperty:Destroy(): void
remoteProperty.Changed(newValue: any): Connection
--]]
|
local IS_SERVER = game:GetService("RunService"):IsServer()
local Signal = require(script.Parent.Parent.Signal)
local ClientRemoteProperty = {}
ClientRemoteProperty.__index = ClientRemoteProperty
function ClientRemoteProperty.new(object)
assert(not IS_SERVER, "ClientRemoteProperty can only be created on the client")
local self = setmetatable({
_object = object;
_value = nil;
_isTable = object:IsA("RemoteEvent");
}, ClientRemoteProperty)
local function SetValue(v)
self._value = v
end
if self._isTable then
self.Changed = Signal.new()
self._change = object.OnClientEvent:Connect(function(tbl)
SetValue(tbl)
self.Changed:Fire(tbl)
end)
SetValue(object.TableRequest:InvokeServer())
else
SetValue(object.Value)
self.Changed = object.Changed
self._change = object.Changed:Connect(SetValue)
end
return self
end
function ClientRemoteProperty:Get()
return self._value
end
function ClientRemoteProperty:Destroy()
self._change:Disconnect()
if self._isTable then
self.Changed:Destroy()
end
end
return ClientRemoteProperty
|
--[[Engine]]
|
--Torque Curve
Tune.Horsepower = 200 -- [TORQUE CURVE VISUAL]
Tune.IdleRPM = 700 -- https://www.desmos.com/calculator/2uo3hqwdhf
Tune.PeakRPM = 6300 -- Use sliders to manipulate values
Tune.Redline = 6700 -- Copy and paste slider values into the respective tune values
Tune.EqPoint = 5500
Tune.PeakSharpness = 7.5
Tune.CurveMult = 0.16
--Incline Compensation
Tune.InclineComp = 1.7 -- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
--Misc
Tune.RevAccel = 150 -- RPM acceleration when clutch is off
Tune.RevDecay = 75 -- RPM decay when clutch is off
Tune.RevBounce = 200 -- RPM kickback from redline
Tune.IdleThrottle = 3 -- Percent throttle at idle
Tune.ClutchTol = 500 -- Clutch engagement threshold (higher = faster response)
|
-- setings
|
local SearchDistance = 80 -- How far a player can be before it detects you
local ZombieDamage = 96 -- How much damage the Zombie inficts towards the player
local DamageWait = 1 -- How many seconds to wait before it can damage the player again
local WanderX, WanderZ = 30, 30
|
--Remember To read EVERYTHING on this button that includes the top >_> Edit it only for Pros.
| |
-- << FUNCTIONS >>
--Open MainFrame
|
function module:OpenMainFrame()
TopBarButton.ImageRectOffset = Vector2.new(64,0)
mainFrame.Visible = true
end
|
--//Controller//--
|
ToolEvent.OnServerEvent:Connect(function(Player, ToolName, Components)
local ToolModuleObject = script:FindFirstChild(ToolName)
if ToolModuleObject then
local ToolModule = require(ToolModuleObject)
coroutine.wrap(function()
ToolModule:ActivateModule(Player, Components)
end)()
end
end)
|
-- Ring5 ascending
|
for l = 1,#lifts5 do
if (lifts5[l].className == "Part") then
lifts5[l].BodyPosition.position = Vector3.new((lifts5[l].BodyPosition.position.x),(lifts5[l].BodyPosition.position.y+8),(lifts5[l].BodyPosition.position.z))
end
end
wait(0.1)
for p = 1,#parts5 do
parts5[p].CanCollide = true
end
wait(0.5)
|
--///////////////////////// Constructors
--//////////////////////////////////////
|
function module.new()
local obj = setmetatable({}, methods)
obj.ObjectPool = moduleObjectPool.new(OBJECT_POOL_SIZE)
obj.MessageCreators = GetMessageCreators()
obj.DefaultCreatorType = messageCreatorUtil.DEFAULT_MESSAGE_CREATOR
messageCreatorUtil:RegisterObjectPool(obj.ObjectPool)
return obj
end
function module:GetStringTextBounds(text, font, textSize, sizeBounds)
return messageCreatorUtil:GetStringTextBounds(text, font, textSize, sizeBounds)
end
return module
|
------------------------------------
|
function onTouched(part)
if part.Parent ~= nil then
local h = part.Parent:findFirstChild("Humanoid")
if h~=nil then
local teleportfrom=script.Parent.Enabled.Value
if teleportfrom~=0 then
if h==humanoid then
return
end
local teleportto=script.Parent.Parent:findFirstChild(modelname)
if teleportto~=nil then
local torso = h.Parent.UpperTorso
local location = {teleportto.Position}
local i = 1
local x = location[i].x
local y = location[i].y
local z = location[i].z
x = x + math.random(-1, 1)
z = z + math.random(-1, 1)
y = y + math.random(2, 3)
local cf = torso.CFrame
local lx = 0
local ly = y
local lz = 0
script.Parent.Enabled.Value=0
teleportto.Enabled.Value=0
torso.CFrame = CFrame.new(Vector3.new(x,y,z), Vector3.new(lx,ly,lz))
wait(3)
script.Parent.Enabled.Value=1
teleportto.Enabled.Value=1
else
print("Could not find teleporter!")
end
end
end
end
end
script.Parent.Touched:connect(onTouched)
|
--RUNNING SCRIPT--
-------------------------------
|
local RunSpeed = 500 -- Change this to the speed you want the player to go
local AfterSpeed = 50 -- Best if you leave this alone. This is the speed the player will be after pressing shift.
|
--
-- THESE ARE THE CORE SETTINGS
-- YOU WILL NOT BE ABLE TO CHANGE THEM IN-GAME
|
local Settings={
--[[
Style Options
������������� ]]
Flat=false; -- Enables Flat theme / Disables Aero theme
ForcedColor=false; -- Forces everyone to have set color & transparency
Color=Color3.new(0,0,0); -- Changes the Color of the user interface
ColorTransparency=.75; -- Changes the Transparency of the user interface
Chat=false; -- Enables the custom chat
BubbleChat=false; -- Enables the custom bubble chat
--[[
Basic Settings
�������������� ]]
AdminCredit=true; -- Enables the credit GUI for that appears in the bottom right
AutoClean=false; -- Enables automatic cleaning of hats & tools in the Workspace
AutoCleanDelay=60; -- The delay between each AutoClean routine
CommandBar=true; -- Enables the Command Bar | GLOBAL KEYBIND: \
FunCommands=true; -- Enables fun yet unnecessary commands
FreeAdmin=false; -- Set to 1-5 to grant admin powers to all, otherwise set to false
PublicLogs=false; -- Allows all users to see the command & chat logs
Prefix=':'; -- Character to begin a command
--[[
Admin Powers
������������
0 Player
1 VIP Can use nonabusive commands only on self
2 Moderator Can kick, mute, & use most commands
3 Administrator Can ban, crash, & set Moderators/VIP
4 SuperAdmin Can grant permanent powers, & shutdown the game
5 Owner Can set SuperAdmins, & use all the commands
6 Game Creator Can set owners & use all the commands
Group & VIP Admin
�����������������
You can set multiple Groups & Ranks to grant users admin powers
GroupAdmin={
[12345]={[254]=4,[253]=3};
[GROUPID]={[RANK]=ADMINPOWER}
};
You can set multiple Assets to grant users admin powers
VIPAdmin={
[12345]=3;
[54321]=4;
[ITEMID]=ADMINPOWER;
}; ]]
GroupAdmin={
};
VIPAdmin={
};
--[[
Permissions
�����������
-- You can set the admin power required to use a command
-- COMMANDNAME=ADMINPOWER; ]]
Permissions={
};
}
return {Settings,{Owners,SuperAdmins,Admins,Mods,VIP,Banned}}
|
--// Recoil Settings
|
gunrecoil = -0.3; -- How much the gun recoils backwards when not aiming
camrecoil = 0.6; -- How much the camera flicks when not aiming
AimGunRecoil = -0.3; -- How much the gun recoils backwards when aiming
AimCamRecoil = 0.5; -- How much the camera flicks when aiming
CamShake = 2; -- THIS IS NEW!!!! CONTROLS CAMERA SHAKE WHEN FIRING
AimCamShake = 3; -- THIS IS ALSO NEW!!!!
Kickback = 0.2; -- Upward gun rotation when not aiming
AimKickback = 0.1; -- Upward gun rotation when aiming
|
--Weld stuff here
|
car.DriveSeat.ChildAdded:connect(function(child)
if child.Name=="SeatWeld" and child:IsA("Weld") and game:GetService("Players"):GetPlayerFromCharacter(child.Part1.Parent)~=nil then
child.C0=CFrame.new(0,-.5,0)*CFrame.fromEulerAnglesXYZ(-(math.pi/2),0,0)*CFrame.Angles(math.rad(13),0,0)
end
end)
|
-- Functions.
|
local function ResizeBar(percent)
if screenVisible then
inside:TweenSize(UDim2.new(percent, 0, 1, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear)
end
end
local function hideLoadingScreen()
if screenVisible then
screenVisible = false
ResizeBar(1)
task.wait(1)
clonedLoadingScreen.Frame:TweenPosition(UDim2.new(0,0,-1.5,0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad, 1)
clonedLoadingScreen:Destroy()
game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.All, true)
game:GetService("TextChatService"):WaitForChild("ChatWindowConfiguration").Enabled = true
game:GetService("TextChatService"):WaitForChild("ChatInputBarConfiguration").Enabled = true
game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
end
end
coroutine.wrap(function()
wait(hideAfter)
ResizeBar(1)
task.wait(1)
hideLoadingScreen()
end)()
|
--TheNexusAvenger
--Runs the client-side rocket launcher.
|
local Tool = script.Parent
local Handle = Tool:WaitForChild("Handle")
local EquipSound = Handle:WaitForChild("EquipSound")
local ReloadSound = Handle:WaitForChild("ReloadSound")
local Resources = require(script.Parent:WaitForChild("Resources"))
local InputHandler = require(Resources:GetResource("InputHandler"))
local AnimationPlayer = require(Resources:GetResource("AnimationPlayer"))
local BufferCreator = require(Resources:GetResource("BufferCreator"))
local RemoteEventCreator = require(Resources:GetResource("RemoteEventCreator"))
local Configuration = require(Resources:GetResource("Configuration"))
local IGNORE_LIST = Configuration.IGNORE_LIST
local ROCKET_RELOAD_WAIT_TO_SHOW_TIME = Configuration.ROCKET_RELOAD_WAIT_TO_SHOW_TIME
local ROCKET_RELOAD_VISIBLE_TIME = Configuration.ROCKET_RELOAD_VISIBLE_TIME
local ROCKET_LAUNCH_SPEED = Configuration.ROCKET_LAUNCH_SPEED
local RocketBuffer = BufferCreator:CreateClientBuffer("RocketBuffer")
local FireRocketEvent = RemoteEventCreator:GetRemoteEvent("FireRocket")
local LocalEquipSound,LocalReloadSound
local CurrentAnimation,CurrentHandRocket
local CurrentMouse
local Equipped = false
local EquipVolume,ReloadVolume = EquipSound.Volume,ReloadSound.Volume
local LastReloadTime = 0
|
--just put this script under the tool and when weilded the left arm will go up aswell.
|
tool=script.Parent
while true do
if tool.Parent.Parent.Name=="Workspace" then
local la=tool.Parent:FindFirstChild("Left Arm")
local ra=tool.Parent:FindFirstChild("Left Arm")
local ts=tool.Parent:FindFirstChild("Torso")
if la~=nil and ts~=nil and ra~=nil then
local ls=ts:FindFirstChild("Left Shoulder")
local rs=ts:FindFirstChild("Right Shoulder")
if ls~=nil and rs~=nil then
ls.CurrentAngle=rs.CurrentAngle*-1
ls.MaxVelocity=0
end
end
end
wait(.02) --If arm looks glitchy, then make this number smaller. And avoid setting to 0(game will crash).
end
|
--[[
@class BlendTextbox.story
]]
|
local require = require(game:GetService("ServerScriptService"):FindFirstChild("LoaderUtils", true).Parent).load(script)
local RunService = game:GetService("RunService")
local Blend = require("Blend")
local Maid = require("Maid")
local PlayerThumbnailUtils = require("PlayerThumbnailUtils")
return function(target)
local maid = Maid.new()
local userIdState = Instance.new("IntValue")
userIdState.Value = 4397833
maid:GiveTask(userIdState)
local isVisible = Instance.new("BoolValue")
isVisible.Value = false
maid:GiveTask(isVisible)
local userImage = Blend.Dynamic(userIdState, function(userId)
return PlayerThumbnailUtils.promiseUserThumbnail(userId)
end)
local userName = Blend.Dynamic(userIdState, function(userId)
return PlayerThumbnailUtils.promiseUserName(userId)
end)
local percentVisible = Blend.Spring(Blend.Computed(isVisible, function(visible)
return visible and 1 or 0
end), 35)
local transparency = Blend.Computed(percentVisible, function(percent)
return 1 - percent
end)
maid:GiveTask((Blend.New "Frame" {
Parent = target;
Name = "ProfileImage";
LayoutOrder = 15;
BackgroundTransparency = 1;
Size = UDim2.new(0, 100, 0, 130);
Position = UDim2.fromScale(0.5, 0.5);
AnchorPoint = Vector2.new(0.5, 0.5);
[Blend.Children] = {
Blend.New "UIScale" {
Scale = Blend.Computed(percentVisible, function(percent)
return 0.8 + 0.2*percent
end);
};
Blend.New "TextLabel" {
Size = UDim2.new(1, 0, 0, 30);
Position = UDim2.new(0.5, 0, 1, 0);
AnchorPoint = Vector2.new(0.5, 1);
BackgroundTransparency = 1;
TextTransparency = transparency;
TextColor3 = Color3.new(1, 1, 1);
TextSize = 20;
Font = Enum.Font.Gotham;
Text = userName;
};
Blend.New "Frame" {
Position = UDim2.new(0.5, 0, 0, 0);
AnchorPoint = Vector2.new(0.5, 0);
Size = UDim2.new(1, 0, 1, 0);
BackgroundColor3 = Color3.new(0.2, 0.25, 0.2);
BackgroundTransparency = transparency;
[Blend.Children] = {
Blend.New "UIAspectRatioConstraint" {
AspectRatio = 1;
};
Blend.New "UICorner" {
CornerRadius = UDim.new(1, 0);
};
Blend.New "UIPadding" {
PaddingLeft = UDim.new(0, 2);
PaddingRight = UDim.new(0, 2);
PaddingTop = UDim.new(0, 2);
PaddingBottom = UDim.new(0, 2);
};
Blend.New "ImageLabel" {
Size = UDim2.new(1, 0, 1, 0);
Image = userImage;
BackgroundTransparency = transparency;
ImageTransparency = transparency;
BackgroundColor3 = Color3.new(0.1, 0.1, 0.1);
[Blend.Children] = {
Blend.New "UICorner" {
CornerRadius = UDim.new(1, 0);
};
};
};
};
};
};
}):Subscribe())
local PERIOD = 2
maid:GiveTask(RunService.RenderStepped:Connect(function()
isVisible.Value = os.clock()/PERIOD % 1 < 0.5
end))
local alive = true
maid:GiveTask(function()
alive = false
end)
maid:GiveTask(isVisible.Changed:Connect(function()
if not isVisible.Value then
task.delay(PERIOD/2, function()
if alive then
userIdState.Value = Random.new():NextInteger(1, 1e9)
end
end)
end
end))
return function()
maid:DoCleaning()
end
end
|
-- List of actions that could be requested
|
Actions = {
['RecolorHandle'] = function (NewColor)
-- Recolors the tool handle
Tool.Handle.BrickColor = NewColor;
end;
['Clone'] = function (Items, Parent)
-- Clones the given items
-- Validate arguments
assert(type(Items) == 'table', 'Invalid items')
assert(typeof(Parent) == 'Instance', 'Invalid parent')
assert(Security.IsLocationAllowed(Parent, Player), 'Permission denied for client')
-- Check if items modifiable
if not CanModifyItems(Items) then
return {}
end
-- Check if parts intruding into private areas
local Parts = GetPartsFromSelection(Items)
if Security.ArePartsViolatingAreas(Parts, Player, false) then
return {}
end
local Clones = {}
-- Clone items
for _, Item in pairs(Items) do
local Clone = Item:Clone()
Clone.Parent = Parent
-- Register the clone
table.insert(Clones, Clone)
CreatedInstances[Item] = Item
end
-- Return the clones
return Clones
end;
['CreatePart'] = function (PartType, Position, Parent)
-- Creates a new part based on `PartType`
-- Validate requested parent
assert(typeof(Parent) == 'Instance', 'Invalid parent')
assert(Security.IsLocationAllowed(Parent, Player), 'Permission denied for client')
-- Create the part
local NewPart = CreatePart(PartType);
-- Position the part
NewPart.CFrame = Position;
-- Cache up permissions for all private areas
local AreaPermissions = Security.GetPermissions(Security.GetSelectionAreas({ NewPart }), Player);
-- Make sure the player is allowed to create parts in the area
if Security.ArePartsViolatingAreas({ NewPart }, Player, false, AreaPermissions) then
return;
end;
-- Parent the part
NewPart.Parent = Parent
-- Register the part
CreatedInstances[NewPart] = NewPart;
-- Return the part
return NewPart;
end;
['CreateGroup'] = function (Type, Parent, Items)
-- Creates a new group of type `Type`
local ValidGroupTypes = {
Model = true,
Folder = true
}
-- Validate arguments
assert(ValidGroupTypes[Type], 'Invalid group type')
assert(typeof(Parent) == 'Instance', 'Invalid parent')
assert(Security.IsLocationAllowed(Parent, Player), 'Permission denied for client')
-- Check if items selectable
if not CanModifyItems(Items) then
return
end
-- Check if parts intruding into private areas
local Parts = GetPartsFromSelection(Items)
local AreaPermissions = Security.GetPermissions(Security.GetSelectionAreas(Parts), Player)
if Security.ArePartsViolatingAreas(Parts, Player, true, AreaPermissions) then
return
end
-- Create group
local Group = Instance.new(Type)
-- Attach children
for _, Item in pairs(Items) do
Item.Parent = Group
end
-- Parent group
Group.Parent = Parent
-- Make joints
if Type == 'Model' then
Group:MakeJoints()
elseif Type == 'Folder' then
local Parts = Support.GetDescendantsWhichAreA(Group, 'BasePart')
for _, Part in pairs(Parts) do
Part:MakeJoints()
end
end
-- Return the new group
return Group
end,
['Ungroup'] = function (Groups)
-- Validate arguments
assert(type(Groups) == 'table', 'Invalid groups')
-- Check if items modifiable
if not CanModifyItems(Groups) then
return
end
-- Check if parts intruding into private areas
local Parts = GetPartsFromSelection(Groups)
local AreaPermissions = Security.GetPermissions(Security.GetSelectionAreas(Parts), Player)
if Security.ArePartsViolatingAreas(Parts, Player, true, AreaPermissions) then
return
end
local Results = {}
-- Check each group
for Key, Group in ipairs(Groups) do
assert(typeof(Group) == 'Instance', 'Invalid group')
-- Track group children
local Children = {}
Results[Key] = Children
-- Unpack group children into parent
local NewParent = Group.Parent
for _, Child in pairs(Group:GetChildren()) do
LastParents[Child] = Group
Children[#Children + 1] = Child
Child.Parent = NewParent
if Child:IsA 'BasePart' then
Child:MakeJoints()
elseif Child:IsA 'Folder' then
local Parts = Support.GetDescendantsWhichAreA(Child, 'BasePart')
for _, Part in pairs(Parts) do
Part:MakeJoints()
end
end
end
-- Track removing group
LastParents[Group] = Group.Parent
CreatedInstances[Group] = Group
-- Remove group
Group.Parent = nil
end
return Results
end,
['SetParent'] = function (Items, Parent)
-- Validate arguments
assert(type(Items) == 'table', 'Invalid items')
assert(type(Parent) == 'table' or typeof(Parent) == 'Instance', 'Invalid parent')
-- Check if items modifiable
if not CanModifyItems(Items) then
return
end
-- Check if parts intruding into private areas
local Parts = GetPartsFromSelection(Items)
local AreaPermissions = Security.GetPermissions(Security.GetSelectionAreas(Parts), Player)
if Security.ArePartsViolatingAreas(Parts, Player, true, AreaPermissions) then
return
end
-- Move each item to different parent
if type(Parent) == 'table' then
for Key, Item in pairs(Items) do
local Parent = Parent[Key]
-- Check if parent allowed
assert(Security.IsLocationAllowed(Parent, Player), 'Permission denied for client')
-- Move item
Item.Parent = Parent
if Item:IsA 'BasePart' then
Item:MakeJoints()
elseif Item:IsA 'Folder' then
local Parts = Support.GetDescendantsWhichAreA(Item, 'BasePart')
for _, Part in pairs(Parts) do
Part:MakeJoints()
end
end
end
-- Move to single parent
elseif typeof(Parent) == 'Instance' then
assert(Security.IsLocationAllowed(Parent, Player), 'Permission denied for client')
-- Reparent items
for _, Item in pairs(Items) do
Item.Parent = Parent
if Item:IsA 'BasePart' then
Item:MakeJoints()
elseif Item:IsA 'Folder' then
local Parts = Support.GetDescendantsWhichAreA(Item, 'BasePart')
for _, Part in pairs(Parts) do
Part:MakeJoints()
end
end
end
end
end,
['SetName'] = function (Items, Name)
-- Validate arguments
assert(type(Items) == 'table', 'Invalid items')
assert(type(Name) == 'table' or type(Name) == 'string', 'Invalid name')
-- Check if items modifiable
if not CanModifyItems(Items) then
return
end
-- Check if parts intruding into private areas
local Parts = GetPartsFromSelection(Items)
local AreaPermissions = Security.GetPermissions(Security.GetSelectionAreas(Parts), Player)
if Security.ArePartsViolatingAreas(Parts, Player, true, AreaPermissions) then
return
end
-- Rename each item to a different name
if type(Name) == 'table' then
for Key, Item in pairs(Items) do
local Name = Name[Key]
Item.Name = Name
end
-- Rename to single name
elseif type(Name) == 'string' then
for _, Item in pairs(Items) do
Item.Name = Name
end
end
end,
['Remove'] = function (Objects)
-- Removes the given objects
-- Get the relevant parts for each object, for permission checking
local Parts = {};
-- Go through the selection
for _, Object in pairs(Objects) do
-- Make sure the object still exists
if Object then
if Object:IsA 'BasePart' then
table.insert(Parts, Object);
elseif Object:IsA 'Smoke' or Object:IsA 'Fire' or Object:IsA 'Sparkles' or Object:IsA 'DataModelMesh' or Object:IsA 'Decal' or Object:IsA 'Texture' or Object:IsA 'Light' then
table.insert(Parts, Object.Parent);
elseif Object:IsA 'Model' or Object:IsA 'Folder' then
Support.ConcatTable(Parts, Support.GetDescendantsWhichAreA(Object, 'BasePart'))
end
end;
end;
-- Check if items modifiable
if not CanModifyItems(Objects) then
return
end
-- Check if parts intruding into private areas
if Security.ArePartsViolatingAreas(Parts, Player, true) then
return
end
-- After confirming permissions, perform each removal
for _, Object in pairs(Objects) do
-- Store the part's current parent
LastParents[Object] = Object.Parent;
-- Register the object
CreatedInstances[Object] = Object;
-- Set the object's current parent to `nil`
Object.Parent = nil;
end;
end;
['UndoRemove'] = function (Objects)
-- Restores the given removed objects to their last parents
-- Get the relevant parts for each object, for permission checking
local Parts = {};
-- Go through the selection
for _, Object in pairs(Objects) do
-- Make sure the object still exists, and that its last parent is registered
if Object then
if Object:IsA 'BasePart' then
table.insert(Parts, Object);
elseif Object:IsA 'Smoke' or Object:IsA 'Fire' or Object:IsA 'Sparkles' or Object:IsA 'DataModelMesh' or Object:IsA 'Decal' or Object:IsA 'Texture' or Object:IsA 'Light' then
--table.insert(Parts, Object.Parent);
Object:Destroy()
elseif Object:IsA 'Model' or Object:IsA 'Folder' then
Support.ConcatTable(Parts, Support.GetDescendantsWhichAreA(Object, 'BasePart'))
end
end;
end;
-- Check if items modifiable
if not CanModifyItems(Objects) then
return
end
-- Check if parts intruding into private areas
if Security.ArePartsViolatingAreas(Parts, Player, false) then
return
end
-- After confirming permissions, perform each removal
for _, Object in pairs(Objects) do
-- Store the part's current parent
--local LastParent = LastParents[Object];
--LastParents[Object] = Object.Parent;
-- Register the object
CreatedInstances[Object] = Object;
-- Set the object's parent to the last parent
Object.Parent = game.Workspace;
-- Make joints
if Object:IsA 'BasePart' then
Object:MakeJoints()
else
local Parts = Support.GetDescendantsWhichAreA(Object, 'BasePart')
for _, Part in pairs(Parts) do
Part:MakeJoints()
end
end
end;
end;
['SyncMove'] = function (Changes)
-- Updates parts server-side given their new CFrames
-- Grab a list of every part we're attempting to modify
local Parts = {};
for _, Change in pairs(Changes) do
if Change.Part then
table.insert(Parts, Change.Part);
end;
end;
-- Ensure parts are selectable
if not CanModifyItems(Parts) then
return;
end;
-- Cache up permissions for all private areas
local AreaPermissions = Security.GetPermissions(Security.GetSelectionAreas(Parts), Player);
-- Make sure the player is allowed to perform changes to these parts
if Security.ArePartsViolatingAreas(Parts, Player, true, AreaPermissions) then
return;
end;
-- Reorganize the changes
local ChangeSet = {};
for _, Change in pairs(Changes) do
if Change.Part then
Change.InitialState = { Anchored = Change.Part.Anchored, CFrame = Change.Part.CFrame };
ChangeSet[Change.Part] = Change;
end;
end;
-- Preserve joints
for Part, Change in pairs(ChangeSet) do
Change.Joints = PreserveJoints(Part, ChangeSet);
end;
-- Perform each change
for Part, Change in pairs(ChangeSet) do
-- Stabilize the parts and maintain the original anchor state
Part.Anchored = true;
Part:BreakJoints();
Part.Velocity = Vector3.new();
Part.RotVelocity = Vector3.new();
-- Set the part's CFrame
Part.CFrame = Change.CFrame;
end;
-- Make sure the player is authorized to move parts into this area
if Security.ArePartsViolatingAreas(Parts, Player, false, AreaPermissions) then
-- Revert changes if unauthorized destination
for Part, Change in pairs(ChangeSet) do
Part.CFrame = Change.InitialState.CFrame;
end;
end;
-- Restore the parts' original states
for Part, Change in pairs(ChangeSet) do
Part:MakeJoints();
RestoreJoints(Change.Joints);
Part.Anchored = Change.InitialState.Anchored;
end;
end;
['SyncResize'] = function (Changes)
-- Updates parts server-side given their new sizes and CFrames
-- Grab a list of every part we're attempting to modify
local Parts = {};
for _, Change in pairs(Changes) do
if Change.Part then
table.insert(Parts, Change.Part);
end;
end;
-- Ensure parts are selectable
if not CanModifyItems(Parts) then
return;
end;
-- Cache up permissions for all private areas
local AreaPermissions = Security.GetPermissions(Security.GetSelectionAreas(Parts), Player);
-- Make sure the player is allowed to perform changes to these parts
if Security.ArePartsViolatingAreas(Parts, Player, true, AreaPermissions) then
return;
end;
-- Reorganize the changes
local ChangeSet = {};
for _, Change in pairs(Changes) do
if Change.Part then
Change.InitialState = { Anchored = Change.Part.Anchored, Size = Change.Part.Size, CFrame = Change.Part.CFrame };
ChangeSet[Change.Part] = Change;
end;
end;
-- Perform each change
for Part, Change in pairs(ChangeSet) do
-- Stabilize the parts and maintain the original anchor state
Part.Anchored = true;
Part:BreakJoints();
Part.Velocity = Vector3.new();
Part.RotVelocity = Vector3.new();
-- Set the part's size and CFrame
Part.Size = Change.Size;
Part.CFrame = Change.CFrame;
end;
-- Make sure the player is authorized to move parts into this area
if Security.ArePartsViolatingAreas(Parts, Player, false, AreaPermissions) then
-- Revert changes if unauthorized destination
for Part, Change in pairs(ChangeSet) do
Part.Size = Change.InitialState.Size;
Part.CFrame = Change.InitialState.CFrame;
end;
end;
-- Restore the parts' original states
for Part, Change in pairs(ChangeSet) do
Part:MakeJoints();
Part.Anchored = Change.InitialState.Anchored;
end;
end;
['SyncRotate'] = function (Changes)
-- Updates parts server-side given their new CFrames
-- Grab a list of every part we're attempting to modify
local Parts = {};
for _, Change in pairs(Changes) do
if Change.Part then
table.insert(Parts, Change.Part);
end;
end;
-- Ensure parts are selectable
if not CanModifyItems(Parts) then
return;
end;
-- Cache up permissions for all private areas
local AreaPermissions = Security.GetPermissions(Security.GetSelectionAreas(Parts), Player);
-- Make sure the player is allowed to perform changes to these parts
if Security.ArePartsViolatingAreas(Parts, Player, true, AreaPermissions) then
return;
end;
-- Reorganize the changes
local ChangeSet = {};
for _, Change in pairs(Changes) do
if Change.Part then
Change.InitialState = { Anchored = Change.Part.Anchored, CFrame = Change.Part.CFrame };
ChangeSet[Change.Part] = Change;
end;
end;
-- Preserve joints
for Part, Change in pairs(ChangeSet) do
Change.Joints = PreserveJoints(Part, ChangeSet);
end;
-- Perform each change
for Part, Change in pairs(ChangeSet) do
-- Stabilize the parts and maintain the original anchor state
Part.Anchored = true;
Part:BreakJoints();
Part.Velocity = Vector3.new();
Part.RotVelocity = Vector3.new();
-- Set the part's CFrame
Part.CFrame = Change.CFrame;
end;
-- Make sure the player is authorized to move parts into this area
if Security.ArePartsViolatingAreas(Parts, Player, false, AreaPermissions) then
-- Revert changes if unauthorized destination
for Part, Change in pairs(ChangeSet) do
Part.CFrame = Change.InitialState.CFrame;
end;
end;
-- Restore the parts' original states
for Part, Change in pairs(ChangeSet) do
Part:MakeJoints();
RestoreJoints(Change.Joints);
Part.Anchored = Change.InitialState.Anchored;
end;
end;
['SyncColor'] = function (Changes)
-- Updates parts server-side given their new colors
-- Grab a list of every part we're attempting to modify
local Parts = {};
for _, Change in pairs(Changes) do
if Change.Part then
table.insert(Parts, Change.Part);
end;
end;
-- Ensure parts are selectable
if not CanModifyItems(Parts) then
return;
end;
-- Cache up permissions for all private areas
local AreaPermissions = Security.GetPermissions(Security.GetSelectionAreas(Parts), Player);
-- Make sure the player is allowed to perform changes to these parts
if Security.ArePartsViolatingAreas(Parts, Player, true, AreaPermissions) then
return;
end;
-- Reorganize the changes
local ChangeSet = {};
for _, Change in pairs(Changes) do
if Change.Part then
ChangeSet[Change.Part] = Change;
end;
end;
-- Perform each change
for Part, Change in pairs(ChangeSet) do
-- Set the part's color
Part.Color = Change.Color;
-- If this part is a union, set its UsePartColor state
if Part.ClassName == 'UnionOperation' then
Part.UsePartColor = Change.UnionColoring;
end;
end;
end;
['SyncSurface'] = function (Changes)
-- Updates parts server-side given their new surfaces
-- Grab a list of every part we're attempting to modify
local Parts = {};
for _, Change in pairs(Changes) do
if Change.Part then
table.insert(Parts, Change.Part);
end;
end;
-- Ensure parts are selectable
if not CanModifyItems(Parts) then
return;
end;
-- Cache up permissions for all private areas
local AreaPermissions = Security.GetPermissions(Security.GetSelectionAreas(Parts), Player);
-- Make sure the player is allowed to perform changes to these parts
if Security.ArePartsViolatingAreas(Parts, Player, true, AreaPermissions) then
return;
end;
-- Reorganize the changes
local ChangeSet = {};
for _, Change in pairs(Changes) do
if Change.Part then
ChangeSet[Change.Part] = Change;
end;
end;
-- Perform each change
for Part, Change in pairs(ChangeSet) do
-- Apply each surface change
for Surface, SurfaceType in pairs(Change.Surfaces) do
Part[Surface .. 'Surface'] = SurfaceType;
end;
end;
end;
['CreateLights'] = function (Changes)
-- Creates lights in the given parts
-- Grab a list of every part we're attempting to modify
local Parts = {};
for _, Change in pairs(Changes) do
if Change.Part then
table.insert(Parts, Change.Part);
end;
end;
-- Ensure parts are selectable
if not CanModifyItems(Parts) then
return;
end;
-- Cache up permissions for all private areas
local AreaPermissions = Security.GetPermissions(Security.GetSelectionAreas(Parts), Player);
-- Make sure the player is allowed to perform changes to these parts
if Security.ArePartsViolatingAreas(Parts, Player, true, AreaPermissions) then
return;
end;
-- Reorganize the changes
local ChangeSet = {};
for _, Change in pairs(Changes) do
if Change.Part then
ChangeSet[Change.Part] = Change;
end;
end;
-- Make a list of allowed light type requests
local AllowedLightTypes = { PointLight = true, SurfaceLight = true, SpotLight = true };
-- Keep track of the newly created lights
local Lights = {};
-- Create each light
for Part, Change in pairs(ChangeSet) do
-- Make sure the requested light type is valid
if AllowedLightTypes[Change.LightType] then
-- Create the light
local Light = Instance.new(Change.LightType, Part);
table.insert(Lights, Light);
-- Register the light
CreatedInstances[Light] = Light;
end;
end;
-- Return the new lights
return Lights;
end;
['SyncLighting'] = function (Changes)
-- Updates aspects of the given selection's lights
-- Grab a list of every part we're attempting to modify
local Parts = {};
for _, Change in pairs(Changes) do
if Change.Part then
table.insert(Parts, Change.Part);
end;
end;
-- Ensure parts are selectable
if not CanModifyItems(Parts) then
return;
end;
-- Cache up permissions for all private areas
local AreaPermissions = Security.GetPermissions(Security.GetSelectionAreas(Parts), Player);
-- Make sure the player is allowed to perform changes to these parts
if Security.ArePartsViolatingAreas(Parts, Player, true, AreaPermissions) then
return;
end;
-- Reorganize the changes
local ChangeSet = {};
for _, Change in pairs(Changes) do
if Change.Part then
ChangeSet[Change.Part] = Change;
end;
end;
-- Make a list of allowed light type requests
local AllowedLightTypes = { PointLight = true, SurfaceLight = true, SpotLight = true };
-- Update each part's lights
for Part, Change in pairs(ChangeSet) do
-- Make sure that the light type requested is valid
if AllowedLightTypes[Change.LightType] then
-- Grab the part's light
local Light = Support.GetChildOfClass(Part, Change.LightType);
-- Make sure the light exists
if Light then
-- Make the requested changes
if Change.Range ~= nil then
Light.Range = Change.Range;
end;
if Change.Brightness ~= nil then
Light.Brightness = Change.Brightness;
end;
if Change.Color ~= nil then
Light.Color = Change.Color;
end;
if Change.Shadows ~= nil then
Light.Shadows = Change.Shadows;
end;
if Change.Face ~= nil then
Light.Face = Change.Face;
end;
if Change.Angle ~= nil then
Light.Angle = Change.Angle;
end;
end;
end;
end;
end;
['CreateDecorations'] = function (Changes)
-- Creates decorations in the given parts
-- Grab a list of every part we're attempting to modify
local Parts = {};
for _, Change in pairs(Changes) do
if Change.Part then
table.insert(Parts, Change.Part);
end;
end;
-- Ensure parts are selectable
if not CanModifyItems(Parts) then
return;
end;
-- Cache up permissions for all private areas
local AreaPermissions = Security.GetPermissions(Security.GetSelectionAreas(Parts), Player);
-- Make sure the player is allowed to perform changes to these parts
if Security.ArePartsViolatingAreas(Parts, Player, true, AreaPermissions) then
return;
end;
-- Reorganize the changes
local ChangeSet = {};
for _, Change in pairs(Changes) do
if Change.Part then
ChangeSet[Change.Part] = Change;
end;
end;
-- Make a list of allowed decoration type requests
local AllowedDecorationTypes = { Smoke = true, Fire = true, Sparkles = true };
-- Keep track of the newly created decorations
local Decorations = {};
-- Create each decoration
for Part, Change in pairs(ChangeSet) do
-- Make sure the requested decoration type is valid
if AllowedDecorationTypes[Change.DecorationType] then
-- Create the decoration
local Decoration = Instance.new(Change.DecorationType, Part);
table.insert(Decorations, Decoration);
-- Register the decoration
CreatedInstances[Decoration] = Decoration;
end;
end;
-- Return the new decorations
return Decorations;
end;
['SyncDecorate'] = function (Changes)
-- Updates aspects of the given selection's decorations
-- Grab a list of every part we're attempting to modify
local Parts = {};
for _, Change in pairs(Changes) do
if Change.Part then
table.insert(Parts, Change.Part);
end;
end;
-- Ensure parts are selectable
if not CanModifyItems(Parts) then
return;
end;
-- Cache up permissions for all private areas
local AreaPermissions = Security.GetPermissions(Security.GetSelectionAreas(Parts), Player);
-- Make sure the player is allowed to perform changes to these parts
if Security.ArePartsViolatingAreas(Parts, Player, true, AreaPermissions) then
return;
end;
-- Reorganize the changes
local ChangeSet = {};
for _, Change in pairs(Changes) do
if Change.Part then
ChangeSet[Change.Part] = Change;
end;
end;
-- Make a list of allowed decoration type requests
local AllowedDecorationTypes = { Smoke = true, Fire = true, Sparkles = true };
-- Update each part's decorations
for Part, Change in pairs(ChangeSet) do
-- Make sure that the decoration type requested is valid
if AllowedDecorationTypes[Change.DecorationType] then
-- Grab the part's decoration
local Decoration = Support.GetChildOfClass(Part, Change.DecorationType);
-- Make sure the decoration exists
if Decoration then
-- Make the requested changes
if Change.Color ~= nil then
Decoration.Color = Change.Color;
end;
if Change.Opacity ~= nil then
Decoration.Opacity = Change.Opacity;
end;
if Change.RiseVelocity ~= nil then
Decoration.RiseVelocity = Change.RiseVelocity;
end;
if Change.Size ~= nil then
Decoration.Size = Change.Size;
end;
if Change.Heat ~= nil then
Decoration.Heat = Change.Heat;
end;
if Change.SecondaryColor ~= nil then
Decoration.SecondaryColor = Change.SecondaryColor;
end;
if Change.SparkleColor ~= nil then
Decoration.SparkleColor = Change.SparkleColor;
end;
end;
end;
end;
end;
['CreateMeshes'] = function (Changes)
-- Creates meshes in the given parts
-- Grab a list of every part we're attempting to modify
local Parts = {};
for _, Change in pairs(Changes) do
if Change.Part then
table.insert(Parts, Change.Part);
end;
end;
-- Ensure parts are selectable
if not CanModifyItems(Parts) then
return;
end;
-- Cache up permissions for all private areas
local AreaPermissions = Security.GetPermissions(Security.GetSelectionAreas(Parts), Player);
-- Make sure the player is allowed to perform changes to these parts
if Security.ArePartsViolatingAreas(Parts, Player, true, AreaPermissions) then
return;
end;
-- Reorganize the changes
local ChangeSet = {};
for _, Change in pairs(Changes) do
if Change.Part then
ChangeSet[Change.Part] = Change;
end;
end;
-- Keep track of the newly created meshes
local Meshes = {};
-- Create each mesh
for Part, Change in pairs(ChangeSet) do
-- Create the mesh
local Mesh = Instance.new('SpecialMesh', Part);
table.insert(Meshes, Mesh);
-- Register the mesh
CreatedInstances[Mesh] = Mesh;
end;
-- Return the new meshes
return Meshes;
end;
['SyncMesh'] = function (Changes)
-- Updates aspects of the given selection's meshes
-- Grab a list of every part we're attempting to modify
local Parts = {};
for _, Change in pairs(Changes) do
if Change.Part then
table.insert(Parts, Change.Part);
end;
end;
-- Ensure parts are selectable
if not CanModifyItems(Parts) then
return;
end;
-- Cache up permissions for all private areas
--[[local AreaPermissions = Security.GetPermissions(Security.GetSelectionAreas(Parts), Player);
-- Make sure the player is allowed to perform changes to these parts
if Security.ArePartsViolatingAreas(Parts, Player, true, AreaPermissions) then
return;
end;]]
-- Reorganize the changes
local ChangeSet = {};
for _, Change in pairs(Changes) do
if Change.Part then
ChangeSet[Change.Part] = Change;
end;
end;
-- Update each part's meshes
for Part, Change in pairs(ChangeSet) do
-- Grab the part's mesh
local Mesh = Support.GetChildOfClass(Part, 'SpecialMesh');
-- Make sure the mesh exists
if Mesh then
-- Make the requested changes
if Change.VertexColor ~= nil then
Mesh.VertexColor = Change.VertexColor;
end;
if Change.MeshType ~= nil then
Mesh.MeshType = Change.MeshType;
end;
if Change.Scale ~= nil then
Mesh.Scale = Change.Scale;
end;
if Change.Offset ~= nil then
Mesh.Offset = Change.Offset;
end;
if Change.MeshId ~= nil then
Mesh.MeshId = Change.MeshId;
end;
if Change.TextureId ~= nil then
Mesh.TextureId = Change.TextureId;
end;
end;
end;
end;
['CreateTextures'] = function (Changes)
-- Creates textures in the given parts
-- Grab a list of every part we're attempting to modify
local Parts = {};
for _, Change in pairs(Changes) do
if Change.Part then
table.insert(Parts, Change.Part);
end;
end;
-- Ensure parts are selectable
if not CanModifyItems(Parts) then
return;
end;
-- Cache up permissions for all private areas
local AreaPermissions = Security.GetPermissions(Security.GetSelectionAreas(Parts), Player);
-- Make sure the player is allowed to perform changes to these parts
if Security.ArePartsViolatingAreas(Parts, Player, true, AreaPermissions) then
return;
end;
-- Reorganize the changes
local ChangeSet = {};
for _, Change in pairs(Changes) do
if Change.Part then
ChangeSet[Change.Part] = Change;
end;
end;
-- Make a list of allowed texture type requests
local AllowedTextureTypes = { Texture = true, Decal = true };
-- Keep track of the newly created textures
local Textures = {};
-- Create each texture
for Part, Change in pairs(ChangeSet) do
-- Make sure the requested light type is valid
if AllowedTextureTypes[Change.TextureType] then
-- Create the texture
local Texture = Instance.new(Change.TextureType, Part);
Texture.Face = Change.Face;
table.insert(Textures, Texture);
-- Register the texture
CreatedInstances[Texture] = Texture;
end;
end;
-- Return the new textures
return Textures;
end;
['SyncTexture'] = function (Changes)
-- Updates aspects of the given selection's textures
-- Grab a list of every part we're attempting to modify
local Parts = {};
for _, Change in pairs(Changes) do
if Change.Part then
table.insert(Parts, Change.Part);
end;
end;
-- Ensure parts are selectable
if not CanModifyItems(Parts) then
return;
end;
-- Cache up permissions for all private areas
local AreaPermissions = Security.GetPermissions(Security.GetSelectionAreas(Parts), Player);
-- Make sure the player is allowed to perform changes to these parts
if Security.ArePartsViolatingAreas(Parts, Player, true, AreaPermissions) then
return;
end;
-- Reorganize the changes
local ChangeSet = {};
for _, Change in pairs(Changes) do
if Change.Part then
ChangeSet[Change.Part] = Change;
end;
end;
-- Make a list of allowed texture type requests
local AllowedTextureTypes = { Texture = true, Decal = true };
-- Update each part's textures
for Part, Change in pairs(ChangeSet) do
-- Make sure that the texture type requested is valid
if AllowedTextureTypes[Change.TextureType] then
-- Get the right textures within the part
for _, Texture in pairs(Part:GetChildren()) do
if Texture.ClassName == Change.TextureType and Texture.Face == Change.Face then
-- Perform the changes
if Change.Texture ~= nil then
Texture.Texture = Change.Texture;
end;
if Change.Transparency ~= nil then
Texture.Transparency = Change.Transparency;
end;
if Change.StudsPerTileU ~= nil then
Texture.StudsPerTileU = Change.StudsPerTileU;
end;
if Change.StudsPerTileV ~= nil then
Texture.StudsPerTileV = Change.StudsPerTileV;
end;
end;
end;
end;
end;
end;
['SyncAnchor'] = function (Changes)
-- Updates parts server-side given their new anchor status
-- Grab a list of every part we're attempting to modify
local Parts = {};
for _, Change in pairs(Changes) do
if Change.Part then
table.insert(Parts, Change.Part);
end;
end;
-- Ensure parts are selectable
if not CanModifyItems(Parts) then
return;
end;
-- Cache up permissions for all private areas
local AreaPermissions = Security.GetPermissions(Security.GetSelectionAreas(Parts), Player);
-- Make sure the player is allowed to perform changes to these parts
if Security.ArePartsViolatingAreas(Parts, Player, true, AreaPermissions) then
return;
end;
-- Reorganize the changes
local ChangeSet = {};
for _, Change in pairs(Changes) do
if Change.Part then
ChangeSet[Change.Part] = Change;
end;
end;
-- Perform each change
for Part, Change in pairs(ChangeSet) do
Part.Anchored = Change.Anchored;
end;
end;
['SyncCollision'] = function (Changes)
-- Updates parts server-side given their new collision status
-- Grab a list of every part we're attempting to modify
local Parts = {};
for _, Change in pairs(Changes) do
if Change.Part then
table.insert(Parts, Change.Part);
end;
end;
-- Ensure parts are selectable
if not CanModifyItems(Parts) then
return;
end;
-- Cache up permissions for all private areas
local AreaPermissions = Security.GetPermissions(Security.GetSelectionAreas(Parts), Player);
-- Make sure the player is allowed to perform changes to these parts
if Security.ArePartsViolatingAreas(Parts, Player, true, AreaPermissions) then
return;
end;
-- Reorganize the changes
local ChangeSet = {};
for _, Change in pairs(Changes) do
if Change.Part then
ChangeSet[Change.Part] = Change;
end;
end;
-- Perform each change
for Part, Change in pairs(ChangeSet) do
Part.CanCollide = Change.CanCollide;
end;
end;
['SyncMaterial'] = function (Changes)
-- Updates parts server-side given their new material
-- Grab a list of every part we're attempting to modify
local Parts = {};
for _, Change in pairs(Changes) do
if Change.Part then
table.insert(Parts, Change.Part);
end;
end;
-- Ensure parts are selectable
if not CanModifyItems(Parts) then
return;
end;
-- Cache up permissions for all private areas
local AreaPermissions = Security.GetPermissions(Security.GetSelectionAreas(Parts), Player);
-- Make sure the player is allowed to perform changes to these parts
if Security.ArePartsViolatingAreas(Parts, Player, true, AreaPermissions) then
return;
end;
-- Reorganize the changes
local ChangeSet = {};
for _, Change in pairs(Changes) do
if Change.Part then
ChangeSet[Change.Part] = Change;
end;
end;
-- Perform each change
for Part, Change in pairs(ChangeSet) do
if Change.Material ~= nil then
Part.Material = Change.Material;
end;
if Change.Transparency ~= nil then
Part.Transparency = Change.Transparency;
end;
if Change.Reflectance ~= nil then
Part.Reflectance = Change.Reflectance;
end;
end;
end;
['CreateWelds'] = function (Parts, TargetPart)
-- Creates welds for the given parts to the target part
-- Ensure parts are selectable
if not CanModifyItems(Parts) then
return;
end;
-- Cache up permissions for all private areas
local AreaPermissions = Security.GetPermissions(Security.GetSelectionAreas(Parts), Player);
-- Make sure the player is allowed to perform changes to these parts
if Security.ArePartsViolatingAreas(Parts, Player, true, AreaPermissions) then
return;
end;
local Welds = {};
-- Create the welds
for _, Part in pairs(Parts) do
-- Make sure we're not welding this part to itself
if Part ~= TargetPart then
-- Calculate the offset of the part from the target part
local Offset = Part.CFrame:toObjectSpace(TargetPart.CFrame);
-- Create the weld
local Weld = Instance.new('Weld');
Weld.Name = 'BTWeld';
Weld.Part0 = TargetPart;
Weld.Part1 = Part;
Weld.C1 = Offset;
Weld.Archivable = true;
Weld.Parent = TargetPart;
-- Register the weld
CreatedInstances[Weld] = Weld;
table.insert(Welds, Weld);
end;
end;
-- Return the welds created
return Welds;
end;
['RemoveWelds'] = function (Welds)
-- Removes the given welds
local Parts = {};
-- Go through each weld
for _, Weld in pairs(Welds) do
-- Make sure each given weld is valid
if Weld.ClassName ~= 'Weld' then
return;
end;
-- Collect the relevant parts for this weld
table.insert(Parts, Weld.Part0);
table.insert(Parts, Weld.Part1);
end;
-- Ensure parts are selectable
if not CanModifyItems(Parts) then
return;
end;
local WeldsRemoved = 0;
-- Cache up permissions for all private areas
local AreaPermissions = Security.GetPermissions(Security.GetSelectionAreas(Parts), Player);
-- Go through each weld
for _, Weld in pairs(Welds) do
-- Check the permissions on each weld-related part
local Part0Unauthorized = Security.ArePartsViolatingAreas({ Weld.Part0 }, Player, true, AreaPermissions);
local Part1Unauthorized = Security.ArePartsViolatingAreas({ Weld.Part1 }, Player, true, AreaPermissions);
-- If at least one of the involved parts is authorized, remove the weld
if not Part0Unauthorized or not Part1Unauthorized then
-- Register the weld
CreatedInstances[Weld] = Weld;
LastParents[Weld] = Weld.Parent;
WeldsRemoved = WeldsRemoved + 1;
-- Remove the weld
Weld.Parent = nil;
end;
end;
-- Return the number of welds removed
return WeldsRemoved;
end;
['UndoRemovedWelds'] = function (Welds)
-- Restores the given removed welds
local Parts = {};
-- Go through each weld
for _, Weld in pairs(Welds) do
-- Make sure each given weld is valid
if Weld.ClassName ~= 'Weld' then
return;
end;
-- Make sure each weld has its old parent registered
if not LastParents[Weld] then
return;
end;
-- Collect the relevant parts for this weld
table.insert(Parts, Weld.Part0);
table.insert(Parts, Weld.Part1);
end;
-- Ensure parts are selectable
if not CanModifyItems(Parts) then
return;
end;
-- Cache up permissions for all private areas
local AreaPermissions = Security.GetPermissions(Security.GetSelectionAreas(Parts), Player);
-- Go through each weld
for _, Weld in pairs(Welds) do
-- Check the permissions on each weld-related part
local Part0Unauthorized = Security.ArePartsViolatingAreas({ Weld.Part0 }, Player, false, AreaPermissions);
local Part1Unauthorized = Security.ArePartsViolatingAreas({ Weld.Part0 }, Player, false, AreaPermissions);
-- If at least one of the involved parts is authorized, restore the weld
if not Part0Unauthorized or not Part1Unauthorized then
-- Store the part's current parent
local LastParent = LastParents[Weld];
LastParents[Weld] = Weld.Parent;
-- Register the weld
CreatedInstances[Weld] = Weld;
-- Set the weld's parent to the last parent
Weld.Parent = LastParent;
end;
end;
end;
['Export'] = function (Parts)
-- Serializes, exports, and returns ID for importing given parts
-- Offload action to server-side if API is running locally
if RunService:IsClient() and not RunService:IsStudio() then
return SyncAPI.ServerEndpoint:InvokeServer('Export', Parts);
end;
-- Ensure valid selection
assert(type(Parts) == 'table', 'Invalid item table');
-- Ensure there are items to export
if #Parts == 0 then
return;
end;
-- Ensure parts are selectable
if not CanModifyItems(Parts) then
return;
end;
-- Cache up permissions for all private areas
local AreaPermissions = Security.GetPermissions(Security.GetSelectionAreas(Parts), Player);
-- Make sure the player is allowed to access these parts
if Security.ArePartsViolatingAreas(Parts, Player, true, AreaPermissions) then
return;
end;
-- Get all descendants of the parts
local Items = Support.CloneTable(Parts);
for _, Part in pairs(Parts) do
Support.ConcatTable(Items, Part:GetDescendants());
end;
-- After confirming permissions, serialize parts
local SerializedBuildData = Serialization.SerializeModel(Items);
-- Push serialized data to server
local Response = HttpService:JSONDecode(
HttpService:PostAsync(
'http://f3xteam.com/bt/export',
HttpService:JSONEncode { data = SerializedBuildData, version = 3, userId = (Player and Player.UserId) },
Enum.HttpContentType.ApplicationJson,
true
)
);
-- Return creation ID on success
if Response.success then
return Response.id;
else
error('Export failed due to server-side error', 2);
end;
end;
['IsHttpServiceEnabled'] = function ()
-- Returns whether HttpService is enabled
-- Offload action to server-side if API is running locally
if RunService:IsClient() and not RunService:IsStudio() then
return SyncAPI.ServerEndpoint:InvokeServer('IsHttpServiceEnabled');
end;
-- For in-game tool, return cached status if available
if ToolMode == 'Tool' and (IsHttpServiceEnabled ~= nil) then
return IsHttpServiceEnabled;
end;
-- Perform test HTTP request
local Success, Error = pcall(function ()
return HttpService:GetAsync('http://google.com');
end);
-- Determine whether HttpService is enabled
if not Success and Error:match 'Http requests are not enabled' then
IsHttpServiceEnabled = false;
elseif Success then
IsHttpServiceEnabled = true;
end;
-- Return HttpService status
return IsHttpServiceEnabled;
end;
['ExtractMeshFromAsset'] = function (AssetId)
-- Returns the first found mesh in the given asset
-- Offload action to server-side if API is running locally
if RunService:IsClient() and not RunService:IsStudio() then
return SyncAPI.ServerEndpoint:InvokeServer('ExtractMeshFromAsset', AssetId);
end;
-- Ensure valid asset ID is given
assert(type(AssetId) == 'number', 'Invalid asset ID');
-- Return parsed response from API
return HttpService:JSONDecode(
HttpService:GetAsync('http://f3xteam.com/bt/getFirstMeshData/' .. AssetId)
);
end;
['ExtractImageFromDecal'] = function (DecalAssetId)
-- Returns the first image found in the given decal asset
-- Offload action to server-side if API is running locally
if RunService:IsClient() and not RunService:IsStudio() then
return SyncAPI.ServerEndpoint:InvokeServer('ExtractImageFromDecal', DecalAssetId);
end;
-- Return direct response from the API
return HttpService:GetAsync('http://f3xteam.com/bt/getDecalImageID/' .. DecalAssetId);
end;
['SetMouseLockEnabled'] = function (Enabled)
-- Sets whether mouse lock is enabled for the current player
-- Offload action to server-side if API is running locally
if RunService:IsClient() and not RunService:IsStudio() then
return SyncAPI.ServerEndpoint:InvokeServer('SetMouseLockEnabled', Enabled);
end;
-- Set whether mouse lock is enabled
Player.DevEnableMouseLock = Enabled;
end;
['SetLocked'] = function (Items, Locked)
-- Locks or unlocks the specified parts
-- Validate arguments
assert(type(Items) == 'table', 'Invalid items')
assert(type(Locked) == 'table' or type(Locked) == 'boolean', 'Invalid lock state')
-- Check if items modifiable
if not CanModifyItems(Items) then
return
end
-- Check if parts intruding into private areas
local Parts = GetPartsFromSelection(Items)
local AreaPermissions = Security.GetPermissions(Security.GetSelectionAreas(Parts), Player)
if Security.ArePartsViolatingAreas(Parts, Player, true, AreaPermissions) then
return
end
-- Set each item to a different lock state
if type(Locked) == 'table' then
for Key, Item in pairs(Items) do
local Locked = Locked[Key]
Item.Locked = Locked
end
-- Set to single lock state
elseif type(Locked) == 'boolean' then
for _, Item in pairs(Items) do
Item.Locked = Locked
end
end
end
}
function CanModifyItems(Items)
-- Returns whether the items can be modified
-- Check each item
for _, Item in pairs(Items) do
-- Catch items that cannot be reached
local ItemAllowed = Security.IsItemAllowed(Item, Player)
if not (ItemAllowed) then
return false
end
-- Catch locked parts
if Options.DisallowLocked and (Item:IsA 'BasePart') and Item.Locked then
return false
end
end
-- Return true if all items modifiable
return true
end
function GetPartsFromSelection(Selection)
local Parts = {}
-- Get parts from selection
for _, Item in pairs(Selection) do
if Item:IsA 'BasePart' then
Parts[#Parts + 1] = Item
-- Get parts within other items
else
for _, Descendant in pairs(Item:GetDescendants()) do
if Descendant:IsA 'BasePart' then
Parts[#Parts + 1] = Descendant
end
end
end
end
-- Return parts
return Parts
end
|
-- Setup loop
|
coroutine.wrap(function()
while true do
wait(60/main.commandsExecutedDivider)
main.commandsExecuted = {}
end
end)()
|
------------------------------------------------------------------------
--
-- * used in luaK:reserveregs(), (lparser) luaY:forlist()
------------------------------------------------------------------------
|
function luaK:checkstack(fs, n)
local newstack = fs.freereg + n
if newstack > fs.f.maxstacksize then
if newstack >= self.MAXSTACK then
luaX:syntaxerror(fs.ls, "function or expression too complex")
end
fs.f.maxstacksize = newstack
end
end
|
-- / Services / --
|
local ContextActionService = game:GetService("ContextActionService");
local TweenService = game:GetService("TweenService");
local RunService = game:GetService("RunService");
local Heartbeat = RunService.Heartbeat;
|
-- Knit
|
local Knit = require( game:GetService("ReplicatedStorage"):WaitForChild("Knit") )
local CustomEnum = require( Knit.Util.CustomEnum )
|
--DevVince was here. :o
|
local banto = script.Parent
local origin = banto.PrimaryPart.CFrame
local tether = 100
local bg = banto.PrimaryPart:WaitForChild'BodyGyro'
local bp = banto.PrimaryPart:WaitForChild'BodyPosition'
bp.Position = origin.p
bg.CFrame = banto.PrimaryPart.CFrame
local hipHeight = 2.25
|
---------------------------------------------------------------
|
function onChildAdded(child)
if child.Name == "SeatWeld" then
local human = child.part1.Parent:findFirstChild("Humanoid")
if (human ~= nil) then
print("Human IN")
seat.SirenControl.CarName.Value = human.Parent.Name.."'s Car"
seat.Parent.Name = human.Parent.Name.."'s Car"
seat.SirenControl.Vehicle.Value = script.Parent.Parent
s.Parent.SirenControl:clone().Parent = game.Players:findFirstChild(human.Parent.Name).PlayerGui
end
end
end
function onChildRemoved(child)
if (child.Name == "SeatWeld") then
local human = child.part1.Parent:findFirstChild("Humanoid")
if (human ~= nil) then
print("Human OUT")
game.Players:findFirstChild(human.Parent.Name).PlayerGui.SirenControl:remove()
end
end
end
script.Parent.ChildAdded:connect(onChildAdded)
script.Parent.ChildRemoved:connect(onChildRemoved)
|
-- Moves the object around a little to indicate it's similar to an item pickup.
|
local TweenService = game:GetService("TweenService")
local part = script.parent
local startPosition = part.Position
part.Anchored = true
local hoverTweenInfo = TweenInfo.new(
1, -- Time
Enum.EasingStyle.Sine, -- EasingStyle
Enum.EasingDirection.InOut, -- EasingDirection
-1, -- RepeatCount (when less than zero the tween will loop indefinitely)
true, -- Reverses (tween will reverse once reaching it's goal)
0 -- DelayTime
)
local tween = TweenService:Create(part, hoverTweenInfo, {Position = startPosition + Vector3.new(0, 0.5, 0)})
tween:Play()
|
--Electric Curve
|
local EHP=_Tune.E_Horsepower/100
local ETQ=_Tune.E_Torque/100
local ETrans1=_Tune.E_Trans1/1000
local ETrans2=_Tune.E_Trans2/1000
local ELimit=_Tune.E_Redline/1000
function elecHP(RPM)
RPM=RPM/1000
local retVal=1e-9
if RPM<=ETrans1 then
retVal=((((RPM/ETrans1)^_Tune.EH_FrontMult)/(1/EHP))*(RPM/ETrans1))+((((RPM/ETrans1)^(1/_Tune.EH_FrontMult))/(1/EHP))*(1-(RPM/ETrans1)))
elseif ETrans1<RPM and RPM<ETrans2 then
retVal=EHP
elseif ETrans2<=RPM then
retVal=EHP-(((RPM-ETrans2)/(ELimit-ETrans2))^_Tune.EH_EndMult)/(1/(EHP*(_Tune.EH_EndPercent/100)))
else
error( "\n\t [AC6C]: Drive initialization failed!"
.."\n\t An unknown error occured when initializing electric horsepower."
.."\n\t Please send a screenshot of this message to Avxnturador."
.."\n\t R: "..RPM..", T1: "..ETrans1", T2: "..ETrans2", L: "..ELimit".")
end
return retVal
end
function elecTQ(RPM)
RPM=RPM/1000
local retVal=1e-9
if RPM<ETrans1 then
retVal=ETQ
elseif ETrans1<=RPM then
retVal=ETQ-(((RPM-ETrans1)/(ELimit-ETrans1))^_Tune.ET_EndMult)/(1/(ETQ*(_Tune.ET_EndPercent/100)))
else
error( "\n\t [AC6C]: Drive initialization failed!"
.."\n\t An unknown error occured when initializing electric torque."
.."\n\t Please send a screenshot of this message to Avxnturador."
.."\n\t R: "..RPM..", T1: "..ETrans1", T2: "..ETrans2", L: "..ELimit".")
end
return retVal
end
|
-- Initialize the tool
|
local MoveTool = {
Name = 'Move Tool';
Color = BrickColor.new 'Deep orange';
-- Default options
Increment = 1;
Axes = 'Global';
};
|
--// All global vars will be wiped/replaced except script
|
return function(data, env)
if env then
setfenv(1, env)
end
local playergui = service.PlayerGui
local gui = client.UI.Prepare(script.Parent.Parent)
local label = gui.LABEL
local str = data.Message
local topbar = client.UI.Get("TopBar")
client.UI.Remove("Notif",script.Parent.Parent)
local log = {
Type = "Notif";
Title = "Notif";
Message = str;
Icon = "rbxassetid://7501175708";
Time = os.date("%X");
Function = nil;
}
table.insert(client.Variables.CommunicationsHistory, log)
service.Events.CommsCenter:Fire(log)
if str and type(str)=="string" then
label.Text = str
label.Position = UDim2.new(0, 0, 0, ((topbar and 40) or 0) - 35)
gTable:Ready()
else
gui:Destroy()
end
end
|
--credit to miked--
|
miked=script.Parent
itlh=miked.Torso:findFirstChild("Left Hip")
itlh.Part0=miked.Torso
itlh.Part1=miked:findFirstChild("Left Leg")
itlh.C0=CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
itrh=miked.Torso:findFirstChild("Right Hip")
itrh.Part0=miked.Torso
itrh.Part1=miked:findFirstChild("Right Leg")
itrh.C0=CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
itls=miked.Torso:findFirstChild("Left Shoulder")
itls.Part1=miked.Torso
itls.C0=CFrame.new(2, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
itls.Part0=miked:findFirstChild("Left Arm")
itrs=miked.Torso:findFirstChild("Right Shoulder")
itrs.Part1=miked.Torso
itrs.C0=CFrame.new(-2, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
itrs.Part0=miked:findFirstChild("Right Arm")
miked.Head:makeJoints()
|
--[[
Returns the farm model in workspace belonging to a player with a user ID
matching the given ownerId. This is based on the OwnerId attribute of farm
models, which gets set by the server when the farm is loaded for a player.
--]]
|
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local FarmConstants = require(ReplicatedStorage.Source.Farm.FarmConstants)
local Attribute = require(ReplicatedStorage.Source.SharedConstants.Attribute)
local Sift = require(ReplicatedStorage.Dependencies.Sift)
local function getFarmModelFromOwnerId(ownerId: number): Model?
local farms = Sift.Array.filter(FarmConstants.FarmContainer:GetChildren(), function(instance: Instance)
return instance:GetAttribute(Attribute.OwnerId) == ownerId
end)
-- At most, only one farm will exist matching the ownerId, so it's safe to grab the first list item
local farm = farms[1]
if farm then
assert(farm:IsA("Model"), "Farm is not a Model")
return farm
end
return nil
end
return getFarmModelFromOwnerId
|
-- Gradually regenerates the Humanoid's Health over time.
|
local REGEN_RATE = 1/100 -- Regenerate this fraction of MaxHealth per second.
local REGEN_STEP = 0.5 -- Wait this long between each regeneration step.
|
-------------------------------------------------------------------------------------
|
Loader:updateModel(Model, Config.userId.Value)
if Config.AutoUpdateCharacter.Value then
while wait(Config.AutoUpdateCharacter.Delay.Value) do
Loader:updateModel(Model, Config.userId.Value)
end
end
|
-- Váriaveis
|
local Prompt = script.Parent.Prompt
local soco = Prompt.Soco
local alarme = Prompt.Alarme
local tela = script.Parent.Body.Tela
|
--Clear the canvas when the button is pressed
|
brushSettings.ClearButton.MouseButton1Click:Connect(function()
paintContainer:ClearAllChildren()
end)
|
-- Allows players to spectate other players.
--
-- ForbiddenJ
|
Camera = workspace.Camera
Player = game.Players.LocalPlayer
SpawnNotificationFunction = game.ReplicatedStorage.ClientStorage.SpawnNotification
SpectateTarget = script.Parent.SpectateTarget -- ObjectValue that refers to a Player object or nil.
SpectatePrevButton = script.Parent.GuiBar.SpectatePrevButton
SpectateNextButton = script.Parent.GuiBar.SpectateNextButton
SpectateButton = script.Parent.GuiBar.SpectateButton
LastSpectated = nil
SpectateNotification = nil
SpectateTargetEventConnections = {}
function TargetCameraOnPlayer(player)
assert(typeof(player) == "Instance" and player:IsA("Player"))
-- Try to target the camera on the other player. Fallback to the local player's
-- character if the other player's character is dead and is not the local player.
local humanoid = (player.Character and player.Character:WaitForChild("Humanoid", 0.5)) or
(Player.Character and Player.Character:WaitForChild("Humanoid", 0.5))
Camera.CameraSubject = humanoid
end
function UpdateSpectateGui()
local targetPlayer = SpectateTarget.Value
local isSpectating = targetPlayer ~= nil
SpectatePrevButton.Visible = isSpectating
SpectateNextButton.Visible = isSpectating
if targetPlayer ~= LastSpectated then
-- Clear the old event connections.
for i, v in pairs(SpectateTargetEventConnections) do
v:Disconnect()
SpectateTargetEventConnections[i] = nil
end
if isSpectating then
-- Spectate the target player.
if SpectateNotification == nil or SpectateNotification.Parent == nil then
SpectateNotification = SpawnNotificationFunction:Invoke("", Color3.new(1, 1, 1), -1)
end
SpectateNotification.LifetimeLeft.Value = -1
SpectateNotification.Text = "Spectating " .. targetPlayer.Name
SpectateTargetEventConnections[1] = targetPlayer.CharacterAdded:Connect(UpdateSpectateGui)
else
-- Reset the GUI to normal.
if SpectateNotification ~= nil and SpectateNotification.Parent ~= nil then
SpectateNotification.LifetimeLeft.Value = 0
end
TargetCameraOnPlayer(Player)
end
end
-- Exempt from player changes for for CharacterAdded events.
if isSpectating then
TargetCameraOnPlayer(SpectateTarget.Value)
end
LastSpectated = SpectateTarget.Value
end
function ToggleIsSpectating()
if SpectateTarget.Value == nil then
SpectateTarget.Value = Player
else
SpectateTarget.Value = nil
end
end
function SpectatePrevious()
local targetPlayer = SpectateTarget.Value
if targetPlayer ~= nil then
local players = game.Players:GetPlayers()
-- Find the index of the player we're currently spectating.
local currentI = nil
for i, player in ipairs(players) do
if player == targetPlayer then
currentI = i
break
end
end
-- What's the previous valid player index?
local targetI = currentI > 1 and currentI - 1 or #players
-- Spectate the player at targetI.
SpectateTarget.Value = players[targetI]
end
end
function SpectateNext()
local targetPlayer = SpectateTarget.Value
if targetPlayer ~= nil then
local players = game.Players:GetPlayers()
-- Find the index of the player we're currently spectating.
local currentI = nil
for i, player in ipairs(players) do
if player == targetPlayer then
currentI = i
break
end
end
-- What's the next valid player index?
local targetI = currentI < #players and currentI + 1 or 1
-- Spectate the player at targetI.
SpectateTarget.Value = players[targetI]
end
end
UpdateSpectateGui()
SpectateTarget.Changed:Connect(UpdateSpectateGui)
SpectateButton.MouseButton1Click:Connect(ToggleIsSpectating)
SpectatePrevButton.MouseButton1Click:Connect(SpectatePrevious)
SpectateNextButton.MouseButton1Click:Connect(SpectateNext)
Player.PlayState.Changed:Connect(function(value)
if value == "Playing" then
SpectateTarget.Value = nil
end
end)
game.Players.PlayerRemoving:Connect(function(player)
if player == SpectateTarget.Value then
SpectateTarget.Value = Player
end
end)
|
-- Services
|
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local GuiService = game:GetService("GuiService")
local UserInputService = game:GetService("UserInputService")
|
-------------------------
|
function DoorClose()
if Shaft00.MetalDoor.CanCollide == false then
Shaft00.MetalDoor.CanCollide = true
while Shaft00.MetalDoor.Transparency > 0.0 do
Shaft00.MetalDoor.Transparency = Shaft00.MetalDoor.Transparency - .1
wait(0.000001)
end
Car.BodyVelocity.velocity = Vector3.new(0, 20, 0) --Change 10 to change the speed.
end
if Shaft01.MetalDoor.CanCollide == false then
Shaft01.MetalDoor.CanCollide = true
while Shaft01.MetalDoor.Transparency > 0.0 do
Shaft01.MetalDoor.Transparency = Shaft01.MetalDoor.Transparency - .1
wait(0.000001)
end
end
if Shaft02.MetalDoor.CanCollide == false then
Shaft02.MetalDoor.CanCollide = true
while Shaft02.MetalDoor.Transparency > 0.0 do
Shaft02.MetalDoor.Transparency = Shaft02.MetalDoor.Transparency - .1
wait(0.000001)
end
Car.BodyVelocity.velocity = Vector3.new(0, -20, 0)
end
if Shaft03.MetalDoor.CanCollide == false then
Shaft03.MetalDoor.CanCollide = true
while Shaft03.MetalDoor.Transparency > 0.0 do
Shaft03.MetalDoor.Transparency = Shaft03.MetalDoor.Transparency - .1
wait(0.000001)
end
Car.BodyVelocity.velocity = Vector3.new(0, -20, 0)
end
if Shaft04.MetalDoor.CanCollide == false then
Shaft04.MetalDoor.CanCollide = true
while Shaft04.MetalDoor.Transparency > 0.0 do
Shaft04.MetalDoor.Transparency = Shaft04.MetalDoor.Transparency - .1
wait(0.000001)
end
Car.BodyVelocity.velocity = Vector3.new(0, -20, 0)
end
if Shaft05.MetalDoor.CanCollide == false then
Shaft05.MetalDoor.CanCollide = true
while Shaft05.MetalDoor.Transparency > 0.0 do
Shaft05.MetalDoor.Transparency = Shaft05.MetalDoor.Transparency - .1
wait(0.000001)
end
Car.BodyVelocity.velocity = Vector3.new(0, -20, 0)
end
if Shaft06.MetalDoor.CanCollide == false then
Shaft06.MetalDoor.CanCollide = true
while Shaft06.MetalDoor.Transparency > 0.0 do
Shaft06.MetalDoor.Transparency = Shaft06.MetalDoor.Transparency - .1
wait(0.000001)
end
Car.BodyVelocity.velocity = Vector3.new(0, -20, 0)
end
if Shaft07.MetalDoor.CanCollide == false then
Shaft07.MetalDoor.CanCollide = true
while Shaft07.MetalDoor.Transparency > 0.0 do
Shaft07.MetalDoor.Transparency = Shaft07.MetalDoor.Transparency - .1
wait(0.000001)
end
Car.BodyVelocity.velocity = Vector3.new(0, -20, 0)
end
if Shaft08.MetalDoor.CanCollide == false then
Shaft08.MetalDoor.CanCollide = true
while Shaft08.MetalDoor.Transparency > 0.0 do
Shaft08.MetalDoor.Transparency = Shaft08.MetalDoor.Transparency - .1
wait(0.000001)
end
Car.BodyVelocity.velocity = Vector3.new(0, -20, 0)
end
if Shaft09.MetalDoor.CanCollide == false then
Shaft09.MetalDoor.CanCollide = true
while Shaft09.MetalDoor.Transparency > 0.0 do
Shaft09.MetalDoor.Transparency = Shaft09.MetalDoor.Transparency - .1
wait(0.000001)
end
Car.BodyVelocity.velocity = Vector3.new(0, -20, 0)
end
if Shaft10.MetalDoor.CanCollide == false then
Shaft10.MetalDoor.CanCollide = true
while Shaft10.MetalDoor.Transparency > 0.0 do
Shaft10.MetalDoor.Transparency = Shaft10.MetalDoor.Transparency - .1
wait(0.000001)
end
Car.BodyVelocity.velocity = Vector3.new(0, -20, 0)
end
if Shaft11.MetalDoor.CanCollide == false then
Shaft11.MetalDoor.CanCollide = true
while Shaft11.MetalDoor.Transparency > 0.0 do
Shaft11.MetalDoor.Transparency = Shaft11.MetalDoor.Transparency - .1
wait(0.000001)
end
Car.BodyVelocity.velocity = Vector3.new(0, -20, 0)
end
if Shaft12.MetalDoor.CanCollide == false then
Shaft12.MetalDoor.CanCollide = true
while Shaft12.MetalDoor.Transparency > 0.0 do
Shaft12.MetalDoor.Transparency = Shaft12.MetalDoor.Transparency - .1
wait(0.000001)
end
Car.BodyVelocity.velocity = Vector3.new(0, -20, 0)
end
if Shaft13.MetalDoor.CanCollide == false then
Shaft13.MetalDoor.CanCollide = true
while Shaft13.MetalDoor.Transparency > 0.0 do
Shaft13.MetalDoor.Transparency = Shaft13.MetalDoor.Transparency - .1
wait(0.000001)
end
Car.BodyVelocity.velocity = Vector3.new(0, -20, 0)
end
end
function onClicked()
DoorClose()
end
script.Parent.MouseButton1Click:connect(onClicked)
script.Parent.MouseButton1Click:connect(function()
if clicker == true
then clicker = false
else
return
end
end)
script.Parent.MouseButton1Click:connect(function()
Car.Touched:connect(function(otherPart)
if otherPart == Elevator.Floors:FindFirstChild(script.Parent.Name)
then StopE() DoorOpen()
end
end)end)
function StopE()
Car.BodyVelocity.velocity = Vector3.new(0, 0, 0)
Car.BodyPosition.position = Elevator.Floors:FindFirstChild(script.Parent.Name).Position
clicker = true
end
function DoorOpen()
while Shaft01.MetalDoor.Transparency < 1.0 do
Shaft01.MetalDoor.Transparency = Shaft01.MetalDoor.Transparency + .1
wait(0.000001)
end
Shaft01.MetalDoor.CanCollide = false
end
|
--[[
Calls a callback on `done` with specific arguments.
]]
|
function Promise.prototype:doneCall(callback, ...)
assert(type(callback) == "function", string.format(ERROR_NON_FUNCTION, "Promise:doneCall"))
local length, values = pack(...)
return self:_finally(debug.traceback(nil, 2), function()
return callback(unpack(values, 1, length))
end, true)
end
|
-- Make sure to add any characters that are currently in the game
-- to the collision group (otherwise the above event wouldn't catch
-- them
|
for _, player in ipairs(Players:GetPlayers()) do
onPlayerAdded(player)
end
|
-- Local player
|
local player = Players.LocalPlayer
|
-------Settings you can change-------
|
config.MaxSlots = 6
config.TimeBeforeTradeConfirmed = 5
|
--[[ @brief Packs a table so that no gaps exist.
@param t The table to pack.
@param maxn The highest index (obtained by table.maxn if nil).
--]]
|
function module.CloseGaps(t, maxn)
if not maxn then maxn = table.maxn(t); end
local j = 1;
for i = 1, maxn do
if t[i] ~= nil then
if i > j then
t[j] = t[i];
t[i] = nil;
end
j = j + 1;
end
end
end
|
--health.Changed:connect(function()
--root.Velocity = Vector3.new(0,5000,0)
--end)
|
local anims = {}
local lastAttack= tick()
local target,targetType
local lastLock = tick()
local fleshDamage = 20
local structureDamage = 10
local path = nil
for _,animObject in next,animations do
anims[animObject.Name] = hum:LoadAnimation(animObject)
end
hum.ChillmanIdle:Play()
|
--[[
___ _______ _ _______
/ _ |____/ ___/ / ___ ____ ___ (_)__ /__ __/
/ __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-< / /
/_/ |_| \___/_//_/\_,_/___/___/_/___/ /_/
SecondLogic @ Inspare
Avxnturador @ Novena
]]
|
local FE = workspace.FilteringEnabled
local car = script.Parent.Car.Value
local handler = car:WaitForChild("AC6_FE_Sounds")
local _Tune = require(car["A-Chassis Tune"])
local BOVact = 0
local BOVact2 = 0
local BOV_Loudness = .05 --volume of the BOV (not exact volume so you kinda have to experiment with it)
local BOV_Pitch = 1.1 --max pitch of the BOV (not exact so might have to mess with it)
local TurboLoudness = .05 --volume of the Turbo (not exact volume so you kinda have to experiment with it also)
script:WaitForChild("Whistle")
script:WaitForChild("BOV")
for i,v in pairs(car.DriveSeat:GetChildren()) do
for _,a in pairs(script:GetChildren()) do
if v.Name==a.Name then v:Stop() wait() v:Destroy() end
end
end
car.DriveSeat.ChildRemoved:connect(function(child)
if child.Name=="SeatWeld" then
for i,v in pairs(car.DriveSeat:GetChildren()) do
for _,a in pairs(script:GetChildren()) do
if v.Name==a.Name then v:Stop() wait() v:Destroy() end
end
end
end
end)
handler:FireServer("newSound","Whistle",car.DriveSeat,script.Whistle.SoundId,0,script.Whistle.Volume,true)
handler:FireServer("newSound","BOV",car.DriveSeat,script.BOV.SoundId,0,script.BOV.Volume,true)
handler:FireServer("playSound","Whistle")
car.DriveSeat:WaitForChild("Whistle")
car.DriveSeat:WaitForChild("BOV")
local ticc = tick()
local _TCount = 0
if _Tune.Aspiration == "Single" then _TCount = 1 elseif _Tune.Aspiration == "Double" then _TCount = 2 end
while wait() do
local psi = (((script.Parent.Values.Boost.Value)/(_Tune.Boost*_TCount))*2)
BOVact = math.floor(psi*20)
WP = (psi)
WV = (psi/4)*TurboLoudness
BP = (1-(-psi/20))*BOV_Pitch
BV = (((-0.5+((psi/2)*BOV_Loudness)))*(1 - script.Parent.Values.Throttle.Value))
if BOVact < BOVact2 then if car.DriveSeat.BOV.IsPaused then if FE then handler:FireServer("playSound","BOV") else car.DriveSeat.BOV:Play() end end end
if BOVact >= BOVact2 then if FE then handler:FireServer("stopSound","BOV") else car.DriveSeat.BOV:Stop() end end
if FE then
handler:FireServer("updateSound","Whistle",script.Whistle.SoundId,WP,WV)
handler:FireServer("updateSound","BOV",script.BOV.SoundId,BP,BV)
else
car.DriveSeat.Whistle.Pitch = WP
car.DriveSeat.Whistle.Volume = WV
car.DriveSeat.BOV.Pitch = BP
car.DriveSeat.BOV.Volume = BV
end
if (tick()-ticc) >= 0.1 then
BOVact2 = math.floor(psi*20)
ticc = tick()
end
end
|
-- print("Malicious object "..i.Name.." detected in "..getAncestry(i).." ("..i.className..")") --unlikely to be useful, likely to be malicious and removed
|
i:Remove()
return
end
end
for x = 1, #hiddenclasses do
if (hiddenclasses[x] == "Rotate" or hiddenclasses[x] == "Weld" or hiddenclasses[x] == "Snap" or hiddenclasses[x] == "Glue" or hiddenclasses[x] == "Motor" or hiddenclasses[x] == "AutoJoint" or hiddenclasses[x] == "JointInstance" or hiddenclasses[x] == "MotorFeature" or hiddenclasses[x] == "VelocityMotor") and i.Parent == game.JointsService then
--do not notify of these
else
if i.className == hiddenclasses[x] then
|
-- Implement Signal:Wait() in terms of a temporary connection using
-- a Signal:Connect() which disconnects itself.
|
function Signal:Wait()
local waitingCoroutine = coroutine.running()
local cn
cn = self:Connect(function(...)
cn:Disconnect()
task.spawn(waitingCoroutine, ...)
end)
return coroutine.yield()
end
|
--[[
Yield until the promise is completed.
This matches the execution model of normal Roblox functions.
]]
|
function Promise.prototype:awaitStatus()
self._unhandledRejection = false
if self._status == Promise.Status.Started then
local bindable = Instance.new("BindableEvent")
self:finally(function()
bindable:Fire()
end)
bindable.Event:Wait()
bindable:Destroy()
end
if self._status == Promise.Status.Resolved then
return self._status, unpack(self._values, 1, self._valuesLength)
elseif self._status == Promise.Status.Rejected then
return self._status, unpack(self._values, 1, self._valuesLength)
end
return self._status
end
local function awaitHelper(status, ...)
return status == Promise.Status.Resolved, ...
end
|
--Put this script into Hats that players must wear; if a player is
--not wearing the hat then it is destroyed.
| |
-- Encapsulate change lines until either a common newline or the end.
|
local ChangeBuffer = {}
ChangeBuffer.__index = ChangeBuffer
function ChangeBuffer.new(op: number, changeColor: DiffOptionsColor): ChangeBuffer
local self = (setmetatable({}, ChangeBuffer) :: any) :: ChangeBuffer
self.op = op
self.line = {}
self.lines = {}
self.changeColor = changeColor
return self
end
function ChangeBuffer:pushSubstring(substring: string): ()
self:pushDiff(Diff.new(self.op, substring))
end
function ChangeBuffer:pushLine(): ()
-- Assume call only if line has at least one diff,
-- therefore an empty line must have a diff which has an empty string.
-- If line has multiple diffs, then assume it has a common diff,
-- therefore change diffs have change color;
-- otherwise then it has line color only.
table.insert(
self.lines,
if #self.line ~= 1
then Diff.new(self.op, concatenateRelevantDiffs(self.op, self.line, self.changeColor))
else
if self.line[1][1] == self.op
then self.line[1] -- can use instance
else Diff.new(self.op, self.line[1][2]) -- was common diff
)
self.line = {}
end
function ChangeBuffer:isLineEmpty(): boolean
return #self.line == 0
end
|
--Engine
|
function Engine()
--Neutral Gear
if _CGear==0 then _ClutchOn = false end
--Car is off
local revMin = _Tune.IdleRPM
if not _IsOn then
revMin = 0
_CGear = 0
_ClutchOn = false
_GThrot = _Tune.IdleThrottle
end
--Determine RPM
local maxSpin=0
for i,v in pairs(Drive) do
if v.RotVelocity.Magnitude>maxSpin then maxSpin = v.RotVelocity.Magnitude end
end
if _ClutchOn then
local aRPM = math.max(math.min(maxSpin*_Tune.Ratios[_CGear+2]*_Tune.FinalDrive*30/math.pi,_Tune.Redline+100),revMin)
local clutchP = math.min(math.abs(aRPM-_RPM)/_Tune.ClutchTol,.9)
_RPM = ( (_RPM*2*clutchP) + (aRPM*2*(1-clutchP)) )/2
_HP = (_Tune.Horsepower/2) * math.sin((math.pi/((1+(math.min(10,_Tune.IdleOffset)/100))*_Tune.PeakRPM)) * (_RPM - (((2-(1+(math.min(10,_Tune.IdleOffset)/100)))* _Tune.PeakRPM)/2))) + (_Tune.Horsepower/2)
_OutTorque = _HP * 5250 / _RPM * _Tune.Ratios[_CGear+2] * _Tune.FinalDrive
else
if _GThrot-_Tune.IdleThrottle>0 then
_RPM = math.min(_RPM+_Tune.RevAccel*_GThrot,_Tune.Redline+100)
else
_RPM = math.max(_RPM-_Tune.RevDecay,revMin)
end
_OutTorque = 0
end
--Rev Limiter
local spLimit = 0
if _RPM>_Tune.Redline then
if _CGear<#_Tune.Ratios-2 then
_RPM = _RPM-_Tune.RevBounce
spLimit = 0
else
_RPM = _RPM-_Tune.RevBounce*.5
end
else
spLimit = (_Tune.Redline+100)*math.pi/(30*_Tune.Ratios[_CGear+2]*_Tune.FinalDrive)
end
--Automatic Transmission
if _TMode == "Auto" and _IsOn then
_ClutchOn = true
if _CGear == 0 then _CGear = 1 end
if _CGear >= 1 then
if _CGear==1 and _GBrake > 0 and car.DriveSeat.Velocity.Magnitude < 20 then
_CGear = -1
else
if _Tune.AutoShiftMode == "RPM" then
if _RPM>(_Tune.PeakRPM+_Tune.AutoUpThresh) then
_CGear=math.min(_CGear+1,#_Tune.Ratios-2)
elseif math.max(math.min(maxSpin*_Tune.Ratios[_CGear+1]*_Tune.FinalDrive*30/math.pi,_Tune.Redline+100),_Tune.IdleRPM)<(_Tune.PeakRPM-_Tune.AutoDownThresh) then
_CGear=math.max(_CGear-1,1)
end
else
if car.DriveSeat.Velocity.Magnitude > math.ceil(wDia*math.pi*(_Tune.PeakRPM+_Tune.AutoUpThresh)/60/_Tune.Ratios[_CGear+2]/_Tune.FinalDrive) then
_CGear=math.min(_CGear+1,#_Tune.Ratios-2)
elseif car.DriveSeat.Velocity.Magnitude < math.ceil(wDia*math.pi*(_Tune.PeakRPM-_Tune.AutoDownThresh)/60/_Tune.Ratios[_CGear+1]/_Tune.FinalDrive) then
_CGear=math.max(_CGear-1,1)
end
end
end
else
if _GThrot-_Tune.IdleThrottle > 0 and car.DriveSeat.Velocity.Magnitude < 20 then
_CGear = 1
end
end
end
--Apply Forces
for i,v in pairs(car.Wheels:GetChildren()) do
local Ref=v.Axle.CFrame.lookVector
local aRef=1
if v.Name=="FL" or v.Name=="RL" then aRef=-1 end
if _Tune.Config ~= "AWD" then _OutTorque = _OutTorque*1.3 end
if _PBrake and ((_Tune.Config ~= "FWD" and (((v.Name=="FL" or v.Name=="FR") and car.DriveSeat.Velocity.Magnitude<20) or ((v.Name=="RR" or v.Name=="RL") and car.DriveSeat.Velocity.Magnitude>=20))) or (_Tune.Config == "FWD" and (v.Name=="RR" or v.Name=="RL"))) then
v["#AV"].maxTorque=Vector3.new(math.abs(Ref.x),math.abs(Ref.y),math.abs(Ref.z))*_Tune.PBrakeForce
v["#AV"].angularvelocity=Vector3.new()
else
if (_TMode == "Manual" and _GBrake==0) or (_TMode == "Auto" and ((_CGear>-1 and _GBrake==0 ) or (_CGear==-1 and _GThrot-_Tune.IdleThrottle==0 )))then
local driven = false
for _,a in pairs(Drive) do if a==v then driven = true end end
if driven then
local on=1
if not script.Parent.IsOn.Value then on=0 end
local throt = _GThrot
if _TMode == "Auto" and _CGear==-1 then throt = _GBrake end
local tqTCS = 1
if _TCS then
tqTCS = 1-(math.min(math.max(0,math.abs(v.RotVelocity.Magnitude*(v.Size.x/2) - v.Velocity.Magnitude)-_Tune.TCSThreshold)/_Tune.TCSGradient,1)*(1-_Tune.TCSLimit))
end
if tqTCS < 1 then
_TCSActive = true
else
_TCSActive = false
end
local dir = 1
if _CGear==-1 then dir = -1 end
v["#AV"].maxTorque=Vector3.new(math.abs(Ref.x),math.abs(Ref.y),math.abs(Ref.z))*_OutTorque*(1+(v.RotVelocity.Magnitude/60)^1.15)*throt*tqTCS*on
v["#AV"].angularvelocity=Ref*aRef*spLimit*dir
else
v["#AV"].maxTorque=Vector3.new()
v["#AV"].angularvelocity=Vector3.new()
end
else
local brake = _GBrake
if _TMode == "Auto" and _CGear==-1 then brake = _GThrot end
v["#AV"].maxTorque=Vector3.new(math.abs(Ref.x),math.abs(Ref.y),math.abs(Ref.z))*_Tune.BrakeForce*brake
v["#AV"].angularvelocity=Vector3.new()
end
end
end
end
|
-- _CGear = -1
|
else
if _Tune.AutoShiftMode == "RPM" then
if car.DriveSeat.Velocity.Magnitude > math.ceil(wDRatio*(_Tune.PeakRPM+_Tune.AutoUpThresh)/_Tune.Ratios[_CGear+2]/fFD) then
_CGear=math.min(_CGear+1,#_Tune.Ratios-2)
elseif car.DriveSeat.Velocity.Magnitude < math.ceil(wDRatio*(_Tune.PeakRPM-_Tune.AutoDownThresh)/_Tune.Ratios[_CGear+1]/fFD) then
_CGear=math.max(_CGear-1,1)
end
else
if car.DriveSeat.Velocity.Magnitude > math.ceil(wDRatio*(_Tune.PeakRPM+_Tune.AutoUpThresh)/_Tune.Ratios[_CGear+2]/fFD) then
_CGear=math.min(_CGear+1,#_Tune.Ratios-2)
elseif car.DriveSeat.Velocity.Magnitude < math.ceil(wDRatio*(_Tune.PeakRPM-_Tune.AutoDownThresh)/_Tune.Ratios[_CGear+1]/fFD) then
_CGear=math.max(_CGear-1,1)
end
end
end
else
if _GThrot-(_Tune.IdleThrottle/100) > 0 and car.DriveSeat.Velocity.Magnitude < 0 then
_CGear = 1
end
end
end
--Average Rotational Speed Calculation
local fwspeed=0
local fwcount=0
local rwspeed=0
local rwcount=0
for i,v in pairs(car.Wheels:GetChildren()) do
if v.Name=="FL" or v.Name=="FR" or v.Name == "F" then
fwspeed=fwspeed+v.RotVelocity.Magnitude
fwcount=fwcount+1
elseif v.Name=="RL" or v.Name=="RR" or v.Name == "R" then
rwspeed=rwspeed+v.RotVelocity.Magnitude
rwcount=rwcount+1
end
end
fwspeed=fwspeed/fwcount
rwspeed=rwspeed/rwcount
local cwspeed=(fwspeed+rwspeed)/2
--Update Wheels
for i,v in pairs(car.Wheels:GetChildren()) do
--Reference Wheel Orientation
local Ref=(CFrame.new(v.Position-((v.Arm.CFrame*cfWRot).lookVector),v.Position)*cfYRot).lookVector
local aRef=1
local diffMult=1
if v.Name=="FL" or v.Name=="RL" then aRef=-1 end
--AWD Torque Scaling
if _Tune.Config == "AWD" then _OutTorque = _OutTorque*rtTwo end
--Differential/Torque-Vectoring
if v.Name=="FL" or v.Name=="FR" then
diffMult=math.max(0,math.min(1,1+((((v.RotVelocity.Magnitude-fwspeed)/fwspeed)/(math.max(_Tune.FDiffSlipThres,1)/100))*((_Tune.FDiffLockThres-50)/50))))
if _Tune.Config == "AWD" then
diffMult=math.max(0,math.min(1,diffMult*(1+((((fwspeed-cwspeed)/cwspeed)/(math.max(_Tune.CDiffSlipThres,1)/100))*((_Tune.CDiffLockThres-50)/50)))))
end
elseif v.Name=="RL" or v.Name=="RR" then
diffMult=math.max(0,math.min(1,1+((((v.RotVelocity.Magnitude-rwspeed)/rwspeed)/(math.max(_Tune.RDiffSlipThres,1)/100))*((_Tune.RDiffLockThres-50)/50))))
if _Tune.Config == "AWD" then
diffMult=math.max(0,math.min(1,diffMult*(1+((((rwspeed-cwspeed)/cwspeed)/(math.max(_Tune.CDiffSlipThres,1)/100))*((_Tune.CDiffLockThres-50)/50)))))
end
end
_TCSActive = false
_ABSActive = false
--Output
if _PBrake and ((_Tune.Config ~= "FWD" and (((v.Name=="FL" or v.Name=="FR") and car.DriveSeat.Velocity.Magnitude<20) or ((v.Name=="RR" or v.Name=="RL") and car.DriveSeat.Velocity.Magnitude>=20))) or (_Tune.Config == "FWD" and (v.Name=="RR" or v.Name=="RL"))) then
--PBrake
v["#AV"].maxTorque=Vector3.new(math.abs(Ref.x),math.abs(Ref.y),math.abs(Ref.z))*PBrakeForce
v["#AV"].angularvelocity=Vector3.new()
else
--Apply Power
if ((_TMode == "Manual" or _TMode == "Semi" or _TMode == "Auto") and _GBrake==0) then
local driven = false
for _,a in pairs(Drive) do if a==v then driven = true end end
if driven then
local on=1
if not car.DriveSeat.IsOn.Value then on=0 end
local throt = (math.min(_GThrot +_CThrot,1))
|
--Key Functions! :D
|
function KeyDown(key, mouse)
print("Key : "..string.byte(key))
wait(0.01)
arms = {Tool.Parent:FindFirstChild("Left Arm"), Tool.Parent:FindFirstChild("Right Arm")}
torso = Tool.Parent:FindFirstChild("Torso")
if arms ~= nil and torso ~= nil then
local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
if sh ~= nil then
local yes = true
if yes then
yes = false
sh[1].Part1 = nil
sh[2].Part1 = nil
if (key=="t") then -- HiHat
local weld2 = Instance.new("Weld")
weld2.Part0 = torso
weld2.Parent = torso
weld2.Part1 = arms[2]
welds[2] = weld2
weld2.C1 = CFrame.new(-1.5, 0.5, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-40), 0)
wait(0.02)
weld2.C1 = CFrame.new(-1.5, 0.5, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-85), math.rad(-40), 0)
wait(0.02)
weld2.C1 = CFrame.new(-1.5, 0.5, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-80), math.rad(-40), 0)
wait(0.02)
weld2.C1 = CFrame.new(-1.5, 0.5, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-75), math.rad(-40), 0)
wait(0.02)
weld2.C1 = CFrame.new(-1.5, 0.5, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-80), math.rad(-40), 0)
wait(0.02)
weld2.C1 = CFrame.new(-1.5, 0.5, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-40), 0)
end
if (key=="h") then -- Snare Drum
local weld1 = Instance.new("Weld")
weld1.Part0 = torso
weld1.Parent = torso
weld1.Part1 = arms[1]
welds[1] = weld1
weld1.C1 = CFrame.new(1.4, 0, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-80), math.rad(40), 0)
wait(0.02)
weld1.C1 = CFrame.new(1.4, 0, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-75), math.rad(40), 0)
wait(0.02)
weld1.C1 = CFrame.new(1.4, 0, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-70), math.rad(40), 0)
wait(0.02)
weld1.C1 = CFrame.new(1.4, 0, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-65), math.rad(40), 0)
wait(0.02)
weld1.C1 = CFrame.new(1.4, 0, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-80), math.rad(40), 0)
wait(0.02)
weld1.C1 = CFrame.new(1.4, 0, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(40), 0)
end
end
end
end
end
|
--///////////////// Internal-Use Methods
--//////////////////////////////////////
|
function methods:InternalDestroy()
for i, channel in pairs(self.Channels) do
channel:InternalRemoveSpeaker(self)
end
self.eDestroyed:Fire()
self.eDestroyed:Destroy()
self.eSaidMessage:Destroy()
self.eReceivedMessage:Destroy()
self.eReceivedUnfilteredMessage:Destroy()
self.eMessageDoneFiltering:Destroy()
self.eReceivedSystemMessage:Destroy()
self.eChannelJoined:Destroy()
self.eChannelLeft:Destroy()
self.eMuted:Destroy()
self.eUnmuted:Destroy()
self.eExtraDataUpdated:Destroy()
self.eMainChannelSet:Destroy()
self.eChannelNameColorUpdated:Destroy()
end
function methods:InternalAssignPlayerObject(playerObj)
self.PlayerObj = playerObj
end
function methods:InternalSendMessage(messageObj, channelName)
local success, err = pcall(function()
self.eReceivedUnfilteredMessage:Fire(messageObj, channelName)
end)
if not success and err then
print("Error sending internal message: " ..err)
end
end
function methods:InternalSendFilteredMessage(messageObj, channelName)
local success, err = pcall(function()
self.eReceivedMessage:Fire(messageObj, channelName)
self.eMessageDoneFiltering:Fire(messageObj, channelName)
end)
if not success and err then
print("Error sending internal filtered message: " ..err)
end
end
function methods:InternalSendSystemMessage(messageObj, channelName)
local success, err = pcall(function()
self.eReceivedSystemMessage:Fire(messageObj, channelName)
end)
if not success and err then
print("Error sending internal system message: " ..err)
end
end
function methods:UpdateChannelNameColor(channelName, channelNameColor)
self.eChannelNameColorUpdated:Fire(channelName, channelNameColor)
end
|
----------------------/-/- Tow Buttons -\-\----------------------
|
gui.Up.MouseButton1Down:Connect(function() BedEvent:FireServer("Up") end)
gui.Down.MouseButton1Down:Connect(function() BedEvent:FireServer("Down") end)
gui.Attach.MouseButton1Down:Connect(function() gui.Parent.CancelInfo.Visible = true attachMode = true end)
gui.Detach.MouseButton1Down:Connect(function() WinchEvent:FireServer("Detach") end)
gui.Weld.MouseButton1Down:Connect(function() WinchEvent:FireServer("Weld") end)
gui.Release.MouseButton1Down:Connect(function() WinchEvent:FireServer("Release") end)
gui.In.MouseButton1Down:Connect(function() WinchEvent:FireServer("In start") end)
gui.Stop.MouseButton1Down:Connect(function() WinchEvent:FireServer("In stop") end)
|
--Made by Stickmasterluke
|
local TweenService = game:GetService("TweenService")
local camera = game.Workspace.CurrentCamera
sp = script.Parent
speedboost = 2 --100% speed bonus
speedforsmoke = 10 --smoke apears when character running >= 10 studs/second.
local WalkFov = 60
local SprintFov = 100
local FovTime = 0.3
local tooltag = script:WaitForChild("ToolTag",2)
if tooltag~=nil then
local tool=tooltag.Value
local h=sp:FindFirstChild("Humanoid")
if h~=nil then
h.WalkSpeed=16+16*speedboost
TweenService:Create(camera, TweenInfo.new(FovTime), {FieldOfView = SprintFov}):Play()
local hrp = sp:FindFirstChild("HumanoidRootPart")
if hrp ~= nil then
smokepart=Instance.new("Part")
smokepart.FormFactor="Custom"
smokepart.Size=Vector3.new(0,0,0)
smokepart.TopSurface="Smooth"
smokepart.BottomSurface="Smooth"
smokepart.CanCollide=false
smokepart.Transparency=1
local weld=Instance.new("Weld")
weld.Name="SmokePartWeld"
weld.Part0 = hrp
weld.Part1=smokepart
weld.C0=CFrame.new(0,-3.5,0)*CFrame.Angles(math.pi/4,0,0)
weld.Parent=smokepart
smokepart.Parent=sp
smoke=Instance.new("Smoke")
smoke.Enabled = hrp.Velocity.magnitude>speedforsmoke
smoke.RiseVelocity=2
smoke.Opacity=.25
smoke.Size=.5
smoke.Parent=smokepart
h.Running:connect(function(speed)
if smoke and smoke~=nil then
smoke.Enabled=speed>speedforsmoke
end
end)
end
end
while tool~=nil and tool.Parent==sp and h~=nil do
sp.ChildRemoved:wait()
end
local h=sp:FindFirstChild("Humanoid")
if h~=nil then
h.WalkSpeed=16
TweenService:Create(camera, TweenInfo.new(FovTime), {FieldOfView = WalkFov}):Play()
end
end
if smokepart~=nil then
smokepart:Destroy()
end
script:Destroy()
|
--[=[
Locks the mouse in the center of the screen. Call `mouse:Unlock()`
to unlock the mouse.
:::caution Must explicitly unlock
See cautionary in `Lock` method above.
]=]
|
function Mouse:LockCenter()
UserInputService.MouseBehavior = Enum.MouseBehavior.LockCenter
end
|
-- Set up the click event handlers for each button
|
for _, button in ipairs(dock:GetChildren()) do
if button:IsA("ImageButton") then
button.MouseButton1Click:Connect(function()
-- Create the jump tween
local Click = script.Click
Click:Play()
end)
end
end
|
-------------------------
|
function onClicked()
Car.BodyVelocity.velocity = Vector3.new(0, 0, 0)
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
|
--// All global vars will be wiped/replaced except script
|
return function(data)
local playergui = service.PlayerGui
local localplayer = service.Players.LocalPlayer
local frame = script.Parent.Parent
local close = frame.Frame.Close
local main = frame.Frame.Main
local title = frame.Frame.Title
local timer = frame.Frame.Timer
local gTable = data.gTable
local clickfunc = data.OnClick
local closefunc = data.OnClose
local ignorefunc = data.OnIgnore
local name = data.Title
local text = data.Message or data.Text or ""
local time = data.Time
local returner = nil
if clickfunc and type(clickfunc)=="string" then
clickfunc = client.Core.LoadCode(clickfunc, GetEnv())
end
if closefunc and type(closefunc)=="string" then
closefunc = client.Core.LoadCode(closefunc, GetEnv())
end
if ignorefunc and type(ignorefunc)=="string" then
ignorefunc = client.Core.LoadCode(ignorefunc, GetEnv())
end
--client.UI.Make("NotificationHolder")
local holder = client.UI.Get("NotificationHolder",nil,true)
if not holder then
local hold = service.New("ScreenGui")
local hTable = client.UI.Register(hold)
local frame = service.New("ScrollingFrame", hold)
client.UI.Prepare(hold)
hTable.Name = "NotificationHolder"
frame.Name = "Frame"
frame.BackgroundTransparency = 1
frame.Size = UDim2.new(0, 200, 0.5, 0)
frame.Position = UDim2.new(1, -210, 0.5, -10)
frame.CanvasSize = UDim2.new(0, 0, 0, 0)
frame.ChildAdded:Connect(function(c)
if #frame:GetChildren() == 0 then
frame.Visible = false
else
frame.Visible = true
end
end)
frame.ChildRemoved:Connect(function(c)
if #frame:GetChildren() == 0 then
frame.Visible = false
else
frame.Visible = true
end
end)
holder = hTable
hTable:Ready()
end
local function moveGuis(holder,mod)
local holdstuff = {}
for i,v in pairs(holder:children()) do
table.insert(holdstuff,1,v)
end
for i,v in pairs(holdstuff) do
v.Position = UDim2.new(0,0,1,-75*(i+mod))
end
holder.CanvasSize=UDim2.new(0,0,0,(#holder:children()*75))
local pos = (((#holder:children())*75) - holder.AbsoluteWindowSize.Y)
if pos<0 then pos = 0 end
holder.CanvasPosition = Vector2.new(0,pos)
end
holder = holder.Object.Frame
title.Text = name
frame.Name = name
main.Text = text
main.MouseButton1Click:Connect(function()
if frame and frame.Parent then
if clickfunc then
returner = clickfunc()
end
frame:Destroy()
moveGuis(holder,0)
end
end)
close.MouseButton1Click:Connect(function()
if frame and frame.Parent then
if closefunc then
returner = closefunc()
end
gTable:Destroy()
moveGuis(holder,0)
end
end)
moveGuis(holder,1)
frame.Parent = holder
frame.Size = UDim2.new(0, 0, 0, 0)
frame:TweenSize(UDim2.new(1, -5, 0, 60),'Out','Quad',0.2)
frame:TweenPosition(UDim2.new(0,0,1,-75),'Out','Linear',0.2)
spawn(function()
local sound = Instance.new("Sound",service.LocalContainer())
if text == "Click here for commands." then
sound.SoundId = "rbxassetid://2871645235"
elseif name == "Warning!" then
sound.SoundId = "rbxassetid://142916958"
else
sound.SoundId = "rbxassetid://1555493683"
end
wait(0.1)
sound:Play()
wait(1)
sound:Destroy()
end)
if time then
timer.Visible = true
spawn(function()
repeat
timer.Text = time
--timer.Size=UDim2.new(0,timer.TextBounds.X,0,10)
wait(1)
time = time-1
until time<=0 or not frame or not frame.Parent
if frame and frame.Parent then
if ignorefunc then
returner = ignorefunc()
end
frame:Destroy()
moveGuis(holder,0)
end
end)
end
repeat wait() until returner ~= nil or not frame or not frame.Parent
return returner
end
|
--[[
Internal method used by __update to apply new props and state
Returns true if the update was completed, false if it was cancelled by shouldUpdate
]]
|
function Component:__resolveUpdate(incomingProps, incomingState)
if config.internalTypeChecks then
internalAssert(Type.of(self) == Type.StatefulComponentInstance, "Invalid use of `__resolveUpdate`")
end
local internalData = self[InternalData]
local virtualNode = internalData.virtualNode
local reconciler = internalData.reconciler
local oldProps = self.props
local oldState = self.state
if incomingProps == nil then
incomingProps = oldProps
end
if incomingState == nil then
incomingState = oldState
end
if self.shouldUpdate ~= nil then
internalData.lifecyclePhase = ComponentLifecyclePhase.ShouldUpdate
local continueWithUpdate = self:shouldUpdate(incomingProps, incomingState)
if not continueWithUpdate then
internalData.lifecyclePhase = ComponentLifecyclePhase.Idle
return false
end
end
if self.willUpdate ~= nil then
internalData.lifecyclePhase = ComponentLifecyclePhase.WillUpdate
self:willUpdate(incomingProps, incomingState)
end
internalData.lifecyclePhase = ComponentLifecyclePhase.Render
self.props = incomingProps
self.state = incomingState
local renderResult = virtualNode.instance:render()
internalData.lifecyclePhase = ComponentLifecyclePhase.ReconcileChildren
reconciler.updateVirtualNodeWithRenderResult(virtualNode, virtualNode.hostParent, renderResult)
if self.didUpdate ~= nil then
internalData.lifecyclePhase = ComponentLifecyclePhase.DidUpdate
self:didUpdate(oldProps, oldState)
end
internalData.lifecyclePhase = ComponentLifecyclePhase.Idle
return true
end
return Component
|
--[[ This HelpButton Theme displays by default the headshot of the LocalPlayer.
Modes: {
"HEADSHOT" -- LocalPlayer Headshot Thumb
"CUSTOM" -- Loads from Settings
}
--]]
|
return function(data, env)
if env then
setfenv(1, env)
end
local playergui = service.PlayerGui
local localplayer = service.Players.LocalPlayer
local gui = service.New("ScreenGui")
local toggle = service.New("ImageButton", gui)
local toggle1 = service.New("Frame", gui)
local round = Instance.new("UICorner")
round.CornerRadius = UDim.new(0, 6)
round.Parent = toggle1
local round1 = Instance.new("UICorner")
round1.CornerRadius = UDim.new(0, 6)
round1.Parent = toggle
local gTable = client.UI.Register(gui)
if client.UI.Get("HelpButton", gui, true) then
gui:Destroy()
gTable:Destroy()
return nil
end
gTable.Name = "HelpButton"
gTable.CanKeepAlive = false
toggle.Name = "Toggle"
toggle1.Name = "RoundFrame"
toggle1.BackgroundColor3 = Color3.fromRGB(17, 17, 17)
toggle.BackgroundTransparency = 1
toggle1.Position = UDim2.new(1, -45, 1, -45)
toggle.Position = UDim2.new(1, -42, 1, -38)
toggle.Size = UDim2.new(0, 33, 0, 33) --33
toggle.ZIndex = 67
toggle1.Size = UDim2.new(0, 40, 0, 40)
toggle.Image =
`https://www.roblox.com/headshot-thumbnail/image?userId={localplayer.UserId}&width=420&height=420&format=png`
toggle.ImageTransparency = 0
--if client.UI.Get("Chat") then
-- toggle.Position = UDim2.new(1, -(45+40),1, -45)
--end
toggle.MouseButton1Down:Connect(
function()
local found = client.UI.Get("UserPanel", nil, true)
if found then
found.Object:Destroy()
else
client.UI.Make("UserPanel", {})
end
end
)
gTable:Ready()
end
|
-- Functions
|
function DisplayManager:StartIntermission(player)
if player then
DisplayIntermission:FireClient(player, true)
else
DisplayIntermission:FireAllClients(true)
end
end
function DisplayManager:StopIntermission(player)
if player then
DisplayIntermission:FireClient(player, false)
else
DisplayIntermission:FireAllClients(false)
end
end
function DisplayManager:UpdateTimerInfo(isIntermission, waitingForPlayers)
DisplayTimerInfo:FireAllClients(isIntermission, waitingForPlayers)
end
function DisplayManager:DisplayVictory(winningTeam)
DisplayVictory:FireAllClients(winningTeam)
end
function DisplayManager:UpdateScore(team, score)
DisplayScore:FireAllClients(team, score)
end
return DisplayManager
|
-- May return NaN or inf or -inf
|
local function absoluteAngleBetween3dVectors(vec1, vec2)
return math.acos(vec1:Dot(vec2) / (vec1.magnitude * vec2.magnitude))
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
for _, child in pairs(character:GetChildren()) do
if child:IsA('Humanoid') then
humanoidCache[player] = child
return child
end
end
end
end
end
local function CreateFollowCamera()
local module = RootCameraCreator()
local tweenAcceleration = math.rad(250)
local tweenSpeed = math.rad(0)
local tweenMaxSpeed = math.rad(250)
local lastUpdate = tick()
function module:Update()
local now = tick()
local userPanningTheCamera = (self.UserPanningTheCamera == true)
if lastUpdate == nil or now - lastUpdate > 1 then
module:ResetCameraLook()
self.LastCameraTransform = nil
end
if lastUpdate then
-- Cap out the delta to 0.5 so we don't get some crazy things when we re-resume from
local delta = math.min(0.5, now - lastUpdate)
local angle = self.TurningLeft and -120 or 0
angle = angle + (self.TurningRight and 120 or 0)
if angle ~= 0 then userPanningTheCamera = true end
self:RotateCamera(self:GetCameraLook(), Vector2.new(math.rad(angle * delta), 0))
end
-- Reset tween speed if user is panning
if userPanningTheCamera then
tweenSpeed = 0
end
local camera = workspace.CurrentCamera
local player = PlayersService.LocalPlayer
local subjectPosition = self:GetSubjectPosition()
if subjectPosition and player and camera then
local zoom = self:GetCameraZoom()
if zoom <= 0 then
zoom = 0.1
end
if self:GetShiftLock() and not self:IsInFirstPerson() then
local offset = ((self:GetCameraLook() * XZ_VECTOR):Cross(UP_VECTOR).unit * 1.75)
-- Check for NaNs
if IsFiniteVector3(offset) then
subjectPosition = subjectPosition + offset
end
zoom = math.max(zoom, 5)
else
if self.LastCameraTransform and not userPanningTheCamera then
local humanoid = findPlayerHumanoid(player)
local cameraSubject = camera and camera.CameraSubject
local isClimbing = humanoid and humanoid:GetState() == Enum.HumanoidStateType.Climbing
local isInVehicle = cameraSubject and cameraSubject:IsA('VehicleSeat')
local isOnASkateboard = cameraSubject and cameraSubject:IsA('SkateboardPlatform')
if (isClimbing or isInVehicle or isOnASkateboard) and lastUpdate and humanoid and humanoid.Torso then
local forwardVector = humanoid.Torso.CFrame.lookVector
if isOnASkateboard then
forwardVector = cameraSubject.CFrame.lookVector
end
local timeDelta = (now - lastUpdate)
tweenSpeed = clamp(0, tweenMaxSpeed, tweenSpeed + tweenAcceleration * timeDelta)
local percent = clamp(0, 1, tweenSpeed * timeDelta)
if not isClimbing and self:IsInFirstPerson() then
percent = 1
end
local y = findAngleBetweenXZVectors(forwardVector, self:GetCameraLook())
-- Check for NaN
if IsFinite(y) then
self:RotateCamera(self:GetCameraLook(), Vector3.new(y * percent, 0, 0))
end
elseif not self:IsInFirstPerson() then
local lastVec = -(self.LastCameraTransform.p - subjectPosition)
local y = findAngleBetweenXZVectors(lastVec, self:GetCameraLook())
-- Check for NaNs
if IsFinite(y)then
self:RotateCamera(self:GetCameraLook(), Vector3.new(y, 0, 0))
end
end
end
end
camera.Focus = CFrame.new(subjectPosition)
camera.CoordinateFrame = CFrame.new(camera.Focus.p - (zoom * self:GetCameraLook()), camera.Focus.p)
self.LastCameraTransform = camera.CoordinateFrame
end
lastUpdate = now
end
return module
end
return CreateFollowCamera
|
-- luacheck: ignore 212
|
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
return function (Cmdr)
local AutoComplete = {
Items = {};
ItemOptions = {};
SelectedItem = 0;
}
local Util = Cmdr.Util
local Shorthands = Util.MakeDictionary({"me", "all", ".", "*"})
local Gui = Player:WaitForChild("PlayerGui"):WaitForChild("Cmdr"):WaitForChild("Autocomplete")
local AutoItem = Gui:WaitForChild("TextButton")
local Title = Gui:WaitForChild("Title")
local Description = Gui:WaitForChild("Description")
local Entry = Gui.Parent:WaitForChild("Frame"):WaitForChild("Entry")
AutoItem.Parent = nil
-- Helper function that sets text and resizes labels
local function SetText(obj, textObj, text, sizeFromContents)
obj.Visible = text ~= nil
textObj.Text = text or ""
if sizeFromContents then
textObj.Size = UDim2.new(0, Util.GetTextSize(text or "", textObj, Vector2.new(1000, 1000), 1, 0).X, obj.Size.Y.Scale, obj.Size.Y.Offset)
end
end
-- Update the info display (Name, type, and description) based on given options.
local function UpdateInfoDisplay (options)
-- Update the objects' text and sizes
SetText(Title, Title.Field, options.name, true)
SetText(Title.Field.Type, Title.Field.Type, options.type and ": " .. options.type:sub(1, 1):upper() .. options.type:sub(2))
SetText(Description, Description.Label, options.description)
Description.Label.TextColor3 = options.invalid and Color3.fromRGB(255, 73, 73) or Color3.fromRGB(255, 255, 255)
-- Calculate needed width and height
local infoWidth = Title.Field.TextBounds.X + Title.Field.Type.TextBounds.X
local guiWidth = math.max(infoWidth, Gui.Size.X.Offset)
Description.Size = UDim2.new(1, 0, 0, 40)
-- Flow description text
while not Description.Label.TextFits do
Description.Size = Description.Size + UDim2.new(0, 0, 0, 2)
if Description.Size.Y.Offset > 500 then
break
end
end
-- Update container
wait()
Gui.UIListLayout:ApplyLayout()
Gui.Size = UDim2.new(0, guiWidth, 0, Gui.UIListLayout.AbsoluteContentSize.Y)
end
--- Shows the auto complete menu with the given list and possible options
-- item = {typedText, suggestedText, options?=options}
-- The options table is optional. `at` should only be passed into AutoComplete::Show
-- name, type, and description may be passed in an options dictionary inside the items as well
-- options.at?: the character index at which to show the menu
-- options.name?: The name to display in the info box
-- options.type?: The type to display in the info box
-- options.prefix?: The current type prefix (%Team)
-- options.description?: The description for the currently active info box
-- options.invalid?: If true, description is shown in red.
-- options.isLast?: If true, auto complete won't keep going after this argument.
function AutoComplete:Show (items, options)
options = options or {}
-- Remove old options.
for _, item in pairs(self.Items) do
if item.gui then
item.gui:Destroy()
end
end
-- Reset state
self.SelectedItem = 1
self.Items = items
self.Prefix = options.prefix or ""
self.LastItem = options.isLast or false
self.Command = options.command
self.Arg = options.arg
self.NumArgs = options.numArgs
-- Generate the new option labels
local autocompleteWidth = 200
for i, item in pairs(self.Items) do
local leftText = item[1]
local rightText = item[2]
if Shorthands[leftText] then
leftText = rightText
end
local btn = AutoItem:Clone()
btn.Name = leftText .. rightText
btn.BackgroundTransparency = i == self.SelectedItem and 0.5 or 1
btn.Typed.Text = leftText
btn.Suggest.Text = string.rep(" ", #leftText) .. rightText:sub(#leftText + 1)
btn.Parent = Gui
btn.LayoutOrder = i
local maxBounds = math.max(btn.Typed.TextBounds.X, btn.Suggest.TextBounds.X) + 20
if maxBounds > autocompleteWidth then
autocompleteWidth = maxBounds
end
item.gui = btn
end
Gui.UIListLayout:ApplyLayout()
-- Todo: Use TextService to find accurate position for auto complete box
local text = Entry.TextBox.Text
local words = Util.SplitString(text)
if text:sub(#text, #text) == " " and not options.at then
words[#words+1] = "e"
end
table.remove(words, #words)
local extra = (options.at and options.at or (#table.concat(words, " ") + 1)) * 7
-- Update the auto complete container
Gui.Position = UDim2.new(0, Entry.TextBox.AbsolutePosition.X - 10 + extra, 0, Entry.TextBox.AbsolutePosition.Y + 30)
Gui.Size = UDim2.new(0, autocompleteWidth, 0, Gui.UIListLayout.AbsoluteContentSize.Y)
Gui.Visible = true
-- Finally, update thge info display
UpdateInfoDisplay(self.Items[1] and self.Items[1].options or options)
end
--- Returns the selected item in the auto complete
function AutoComplete:GetSelectedItem ()
if Gui.Visible == false then
return nil
end
return AutoComplete.Items[AutoComplete.SelectedItem]
end
--- Hides the auto complete
function AutoComplete:Hide ()
Gui.Visible = false
end
--- Returns if the menu is visible
function AutoComplete:IsVisible ()
return Gui.Visible
end
--- Changes the user's item selection by the given delta
function AutoComplete:Select (delta)
if not Gui.Visible then return end
self.SelectedItem = self.SelectedItem + delta
if self.SelectedItem > #self.Items then
self.SelectedItem = 1
elseif self.SelectedItem < 1 then
self.SelectedItem = #self.Items
end
for i, item in pairs(self.Items) do
item.gui.BackgroundTransparency = i == self.SelectedItem and 0.5 or 1
end
if self.Items[self.SelectedItem] and self.Items[self.SelectedItem].options then
UpdateInfoDisplay(self.Items[self.SelectedItem].options or {})
end
end
return AutoComplete
end
|
--[=[
@class Comm
Remote communication library.
This exposes the raw functions that are used by the `ServerComm` and `ClientComm` classes.
Those two classes should be preferred over accessing the functions directly through this
Comm library.
]=]
|
local Comm = {Server = {}, Client = {}}
|
-- Wether or not we should use some even worse temp hacks than the rest of the temp hacks to avoid RobloxSecurity APIs
|
return true
|
---[[ Window Settings ]]
|
module.MinimumWindowSize = UDim2.new(0.25, 0, 0.25, 0)
module.MaximumWindowSize = UDim2.new(1, 0, 1, 0) -- if you change this to be greater than full screen size, weird things start to happen with size/position bounds checking.
module.DefaultWindowPosition = UDim2.new(0, 0, .45, 0)
local extraOffset = (7 * 2) + (5 * 2) -- Extra chatbar vertical offset
module.DefaultWindowSizePhone = UDim2.new(0.5, 0, 0.5, extraOffset)
module.DefaultWindowSizeTablet = UDim2.new(0.4, 0, 0.3, extraOffset)
module.DefaultWindowSizeDesktop = UDim2.new(0.25, 0, 0.25, extraOffset)
|
--Unsprung Weight
|
Tune.FWheelDensity = .1 -- Front Wheel Density
Tune.RWheelDensity = .1 -- Rear Wheel Density
Tune.FWLgcyDensity = 1 -- Front Wheel Density [PGS OFF]
Tune.RWLgcyDensity = 1 -- Rear Wheel Density [PGS OFF]
Tune.AxleSize = 2 -- Size of structural members (larger = MORE STABLE / carry more weight)
Tune.AxleDensity = .1 -- Density of structural members
|
--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.Rose -- Change "Sword" to the name of your tool, make sure your tool is in ServerStorage
hitPart.Touched:Connect(function(hit)
if debounce == true then
if hit.Parent:FindFirstChild("Humanoid") then
local plr = game.Players:FindFirstChild(hit.Parent.Name)
if plr then
debounce = false
hitPart.BrickColor = BrickColor.new("Bright red")
tool:Clone().Parent = plr.Backpack
wait(3) -- Change "3" to however long you want the player to have to wait before they can get the tool again
debounce = true
hitPart.BrickColor = BrickColor.new("Bright green")
end
end
end
end)
|
--Camera bobbing
-- Shakes the camera when the player is walking
|
local runService = game:GetService("RunService")
local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")
function updateBobbleEffect()
local currentTime = tick()
if humanoid.MoveDirection.Magnitude > 0 then
local bobbleX = math.cos(currentTime * 10) * .25
local bobbleY = math.abs(math.sin(currentTime * 10)) * .25
local bobble = Vector3.new(bobbleX, bobbleY, 0)
humanoid.CameraOffset = humanoid.CameraOffset:lerp(bobble, .200)
else
humanoid.CameraOffset = humanoid.CameraOffset * .75
end
end
runService.RenderStepped:Connect(updateBobbleEffect)
|
--------LEFT DOOR --------
|
game.Workspace.doorleft.l11.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l21.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l31.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l41.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l51.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l61.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l73.BrickColor = BrickColor.new(1003)
|
--[[
Constructs a new Promise with the given initializing callback.
This is generally only called when directly wrapping a non-promise API into
a promise-based version.
The callback will receive 'resolve' and 'reject' methods, used to start
invoking the promise chain.
Second parameter, parent, is used internally for tracking the "parent" in a
promise chain. External code shouldn't need to worry about this.
]]
|
function Promise._new(traceback, callback, parent)
if parent ~= nil and not Promise.is(parent) then
error("Argument #2 to Promise.new must be a promise or nil", 2)
end
local self = {
-- Used to locate where a promise was created
_source = traceback,
_status = Promise.Status.Started,
-- A table containing a list of all results, whether success or failure.
-- Only valid if _status is set to something besides Started
_values = nil,
-- Lua doesn't like sparse arrays very much, so we explicitly store the
-- length of _values to handle middle nils.
_valuesLength = -1,
-- Tracks if this Promise has no error observers..
_unhandledRejection = true,
-- Queues representing functions we should invoke when we update!
_queuedResolve = {},
_queuedReject = {},
_queuedFinally = {},
-- The function to run when/if this promise is cancelled.
_cancellationHook = nil,
-- The "parent" of this promise in a promise chain. Required for
-- cancellation propagation upstream.
_parent = parent,
-- Consumers are Promises that have chained onto this one.
-- We track them for cancellation propagation downstream.
_consumers = setmetatable({}, MODE_KEY_METATABLE),
}
if parent and parent._status == Promise.Status.Started then
parent._consumers[self] = true
end
setmetatable(self, Promise)
local function resolve(...)
self:_resolve(...)
end
local function reject(...)
self:_reject(...)
end
local function onCancel(cancellationHook)
if cancellationHook then
if self._status == Promise.Status.Cancelled then
cancellationHook()
else
self._cancellationHook = cancellationHook
end
end
return self._status == Promise.Status.Cancelled
end
coroutine.wrap(function()
local ok, _, result = runExecutor(
self._source,
callback,
resolve,
reject,
onCancel
)
if not ok then
reject(result[1])
end
end)()
return self
end
function Promise.new(executor)
return Promise._new(debug.traceback(nil, 2), executor)
end
function Promise:__tostring()
return string.format("Promise(%s)", self:getStatus())
end
|
-- ============================================
-- Falling Objects
|
local burningRock =
{
MODEL = ServerStorage["Burning Rock"],
DAMAGE = 20,
NUMBER_PER_MINUTE = 20,
CLEANUP_DELAY_IN_SECONDS = 5
}
local healingWater =
{
MODEL = ServerStorage["Healing Water"],
DAMAGE= -20,
NUMBER_PER_MINUTE = 20,
CLEANUP_DELAY_IN_SECONDS = 5
}
table.insert(fallingStuffTable, burningRock)
table.insert(fallingStuffTable,healingWater)
|
-- Get references to the DockShelf and its children
|
local dockShelf = script.Parent.Parent.Parent.Parent.Parent.DockShelf
local aFinderButton = dockShelf.BClippsly
local Minimalise = script.Parent
local window = script.Parent.Parent.Parent
|
--[[Weight and CG]]
|
Tune.Weight = 3214 -- Total weight (in pounds)
Tune.WeightBSize = { -- Size of weight brick (dimmensions in studs ; larger = more stable)
--[[Width]] 6 ,
--[[Height]] 3.5 ,
--[[Length]] 15 }
Tune.WeightDist = 50 -- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
Tune.CGHeight = .8 -- Center of gravity height (studs relative to median of all wheels)
Tune.WBVisible = false -- Makes the weight brick visible
--Unsprung Weight
Tune.FWheelDensity = .1 -- Front Wheel Density
Tune.RWheelDensity = .1 -- Rear Wheel Density
Tune.FWLgcyDensity = 1 -- Front Wheel Density [PGS OFF]
Tune.RWLgcyDensity = 1 -- Rear Wheel Density [PGS OFF]
Tune.AxleSize = 2 -- Size of structural members (larger = more stable/carry more weight)
Tune.AxleDensity = .1 -- Density of structural members
|
--// Bullet Physics
|
BulletPhysics = Vector3.new(0,55,0); -- Drop fixation: Lower number = more drop
BulletSpeed = 2000; -- Bullet Speed
BulletSpread = 1; -- How much spread the bullet has
ExploPhysics = Vector3.new(0,20,0); -- Drop for explosive rounds
ExploSpeed = 600; -- Speed for explosive rounds
BulletDecay = 10000; -- How far the bullet travels before slowing down and being deleted (BUGGY)
|
--
|
script.Parent.Handle3.Hinge1.Transparency = 1
script.Parent.Handle3.Interactive1.Transparency = 1
script.Parent.Handle3.Part1.Transparency = 1
wait(0.03)
script.Parent.Handle1.Hinge1.Transparency = 1
script.Parent.Handle1.Interactive1.Transparency = 1
script.Parent.Handle1.Part1.Transparency = 1
|
-- NOTE: This function is radically different from the engine's implementation
|
local walkVelocityVector = Vector3_new(1,1,1)
local function calcDesiredWalkVelocity()
-- TEMP
return walkVelocityVector
end
local function preStepSimulatorSide(dt)
if getAutoJump() and enableAutoJump() then
local desiredWalkVelocity = calcDesiredWalkVelocity();
if (not vec3IsZero(desiredWalkVelocity)) then
doAutoJump();
end
end
end
local function AutoJumper()
local this = {}
local running = false
local runRoutine = nil
function this:Run()
running = true
local thisRoutine = nil
thisRoutine = coroutine.create(function()
while running and thisRoutine == runRoutine do
this:Step()
task.wait()
end
end)
runRoutine = thisRoutine
coroutine.resume(thisRoutine)
end
function this:Stop()
running = false
end
function this:Step()
preStepSimulatorSide()
end
return this
end
|
-- Libraries
|
Core = require(script.Parent.Core);
Support = Core.Support;
SnapTracking = {};
SnapTracking.Enabled = false;
SnapTracking.TrackCorners = true;
SnapTracking.TrackFaceCentroids = true;
SnapTracking.TrackEdgeMidpoints = true;
function SnapTracking.StartTracking(Callback)
-- Starts displaying the given target's snap point nearest to the mouse, calls back every time a new point is approached
-- Make sure tracking isn't already on
if SnapTracking.Enabled then
SnapTracking.StopTracking();
end;
-- Indicate that tracking is now enabled
SnapTracking.Enabled = true;
-- Disable selection
Core.Targeting.CancelSelecting();
-- Start the UI
SnapTracking.StartUI();
-- Store callback to send changes in current snapping point
SnapTracking.SetCallback(Callback);
-- Start tracking mouse movement
function UpdateTrackingTarget(Input)
-- Blacklist the player's character and the items in `TargetBlacklist`
local TargetBlacklist = Support.ConcatTable(
{ Player and Player.Character },
SnapTracking.TargetBlacklist or {}
);
-- Find the current target part and point
local TargetRay = Workspace.CurrentCamera:ScreenPointToRay(Input.Position.X, Input.Position.Y);
local TargetPart, TargetPoint, TargetNormal, TargetMaterial = Workspace:FindPartOnRayWithIgnoreList(
Ray.new(TargetRay.Origin, TargetRay.Direction * 5000),
TargetBlacklist
);
-- Make sure a target part exists
if not TargetPart then
return;
end;
-- Check with any snapping target filter
if SnapTracking.TargetFilter and not SnapTracking.TargetFilter(TargetPart) then
return;
end;
-- Set the current target for snap point tracking
SnapTracking.MousePoint = TargetPoint;
SnapTracking.SetTrackingTarget(TargetPart);
end;
-- Update the tracking and UI to the current mouse and proximity state
if not SnapTracking.CustomMouseTracking then
SnapTracking.MouseTracking = Support.AddUserInputListener('Changed', 'MouseMovement', false, UpdateTrackingTarget);
UpdateTrackingTarget({ Position = Vector2.new(Core.Mouse.X, Core.Mouse.Y) });
SnapTracking.Update();
end;
end;
function SnapTracking.SetCallback(Callback)
-- Sets the function that is called back whenever a new snap point is in focus
SnapTracking.Callback = Callback;
end;
function SnapTracking.StartUI()
-- Creates the point marking UI
SnapTracking.PointMarker = Core.Tool.Interfaces.PointMarker:Clone();
SnapTracking.PointMarker.Parent = Core.UI;
end;
function SnapTracking.ClearUI()
-- Removes the point marking UI
-- Make sure tracking is currently enabled
if not SnapTracking.Enabled then
return;
end;
-- Remove the point marker UI
SnapTracking.PointMarker:Destroy();
SnapTracking.PointMarker = nil;
end;
function SnapTracking.Update()
-- Updates the current closest point, reflects it on UI, calls callback function
-- Make sure tracking is currently enabled
if not SnapTracking.Enabled then
return;
end;
-- Calculate the closest point
local ClosestPoint = SnapTracking.GetClosestPoint();
-- Inform the callback function
SnapTracking.Callback(ClosestPoint);
-- Update the point marker UI
SnapTracking.UpdateUI(ClosestPoint);
end;
function SnapTracking.UpdateUI(Point)
-- Updates the point marker UI to reflect the position of the current closest snap point
-- Make sure tracking is enabled, and that the UI has started
if not SnapTracking.Enabled or not SnapTracking.PointMarker then
return;
end;
-- Make sure there's actually a point that needs to be marked, or hide the point marker
if not Point then
SnapTracking.PointMarker.Visible = false;
return;
end;
-- Map the point's position on the screen
local PointPosition, PointVisible = Workspace.CurrentCamera:WorldToScreenPoint(Point.p);
-- Move the point marker UI to the point's position on the screen
SnapTracking.PointMarker.Visible = PointVisible;
SnapTracking.PointMarker.Position = UDim2.new(0, PointPosition.X, 0, PointPosition.Y);
end;
function SnapTracking.SetTrackingTarget(NewTarget)
-- Sets the target part whose snapping points' proximity we are tracking
SnapTracking.Target = NewTarget;
SnapTracking.Update();
end;
function SnapTracking.GetClosestPoint()
-- Find the current nearest snapping point for the target, update the GUI
-- Make sure there's a target part to track, and a current mouse position to calculate proximity relative to
if not SnapTracking.Target or not SnapTracking.MousePoint then
return nil;
end;
local SnappingPoints = {};
local SnappingPointProximity = {};
-- Get the current target's snapping points
local PartCFrame = SnapTracking.Target.CFrame;
local PartSize = SnapTracking.Target.Size / 2;
local SizeX, SizeY, SizeZ = PartSize.X, PartSize.Y, PartSize.Z;
-- Filter based on snapping point options
if SnapTracking.TrackCorners then
table.insert(SnappingPoints, PartCFrame * CFrame.new(SizeX, SizeY, SizeZ));
table.insert(SnappingPoints, PartCFrame * CFrame.new(-SizeX, SizeY, SizeZ));
table.insert(SnappingPoints, PartCFrame * CFrame.new(SizeX, -SizeY, SizeZ));
table.insert(SnappingPoints, PartCFrame * CFrame.new(SizeX, SizeY, -SizeZ));
table.insert(SnappingPoints, PartCFrame * CFrame.new(-SizeX, SizeY, -SizeZ));
table.insert(SnappingPoints, PartCFrame * CFrame.new(-SizeX, -SizeY, SizeZ));
table.insert(SnappingPoints, PartCFrame * CFrame.new(SizeX, -SizeY, -SizeZ));
table.insert(SnappingPoints, PartCFrame * CFrame.new(-SizeX, -SizeY, -SizeZ));
end;
if SnapTracking.TrackEdgeMidpoints then
table.insert(SnappingPoints, PartCFrame * CFrame.new(SizeX, SizeY, 0));
table.insert(SnappingPoints, PartCFrame * CFrame.new(SizeX, 0, SizeZ));
table.insert(SnappingPoints, PartCFrame * CFrame.new(0, SizeY, SizeZ));
table.insert(SnappingPoints, PartCFrame * CFrame.new(-SizeX, SizeY, 0));
table.insert(SnappingPoints, PartCFrame * CFrame.new(-SizeX, 0, SizeZ));
table.insert(SnappingPoints, PartCFrame * CFrame.new(0, -SizeY, SizeZ));
table.insert(SnappingPoints, PartCFrame * CFrame.new(SizeX, -SizeY, 0));
table.insert(SnappingPoints, PartCFrame * CFrame.new(SizeX, 0, -SizeZ));
table.insert(SnappingPoints, PartCFrame * CFrame.new(0, SizeY, -SizeZ));
table.insert(SnappingPoints, PartCFrame * CFrame.new(-SizeX, -SizeY, 0));
table.insert(SnappingPoints, PartCFrame * CFrame.new(-SizeX, 0, -SizeZ));
table.insert(SnappingPoints, PartCFrame * CFrame.new(0, -SizeY, -SizeZ));
end;
if SnapTracking.TrackFaceCentroids then
table.insert(SnappingPoints, PartCFrame * CFrame.new(SizeX, 0, 0));
table.insert(SnappingPoints, PartCFrame * CFrame.new(0, 0, SizeZ));
table.insert(SnappingPoints, PartCFrame * CFrame.new(0, SizeY, 0));
table.insert(SnappingPoints, PartCFrame * CFrame.new(-SizeX, 0, 0));
table.insert(SnappingPoints, PartCFrame * CFrame.new(0, -SizeY, 0));
table.insert(SnappingPoints, PartCFrame * CFrame.new(0, 0, -SizeZ));
end;
-- Calculate proximity of each snapping point to the mouse
for SnappingPointKey, SnappingPoint in ipairs(SnappingPoints) do
SnappingPointProximity[SnappingPointKey] = (SnapTracking.MousePoint - SnappingPoint.p).magnitude;
end;
-- Sort out the closest snapping point
local ClosestPointKey = 1;
for PointKey, Proximity in pairs(SnappingPointProximity) do
if Proximity < SnappingPointProximity[ClosestPointKey] then
ClosestPointKey = PointKey;
end;
end;
-- Return the closest point
return SnappingPoints[ClosestPointKey];
end;
function SnapTracking.StopTracking()
-- Stops tracking the current closest snapping point, cleans up
-- Clear the previous tracking target, and callback
SnapTracking.Target = nil;
SnapTracking.Callback = nil;
-- Reset snapping point options
SnapTracking.TrackFaceCentroids = true;
SnapTracking.TrackEdgeMidpoints = true;
SnapTracking.TrackCorners = true;
SnapTracking.TargetFilter = nil;
SnapTracking.TargetBlacklist = {};
-- Make sure we're currently tracking
if not SnapTracking.Enabled then
return;
end;
-- Stop tracking the mouse and its proximity to snapping points
SnapTracking.MouseTracking:disconnect();
SnapTracking.MouseTracking = nil;
-- Clear the point marker UI from the screen
SnapTracking.ClearUI();
-- Indicate that tracking is no longer enabled
SnapTracking.Enabled = false;
end;
return SnapTracking;
|
--Automatic Settings
|
Tune.AutoShiftMode = "RPM" --[[
[Modes]
"Speed" : Shifts based on wheel speed
"RPM" : Shifts based on RPM ]]
Tune.AutoShiftType = "DCT" --[[
[Types]
"Rev" : Clutch engages fully once RPM reached
"DCT" : Clutch engages after a set time has passed ]]
Tune.AutoUpThresh = 200 -- Automatic upshift point (relative to peak RPM, positive = Over-rev)
Tune.AutoDownThresh = 1400 -- Automatic downshift point (relative to peak RPM, positive = Under-rev)
|
--[=[
@type ExtensionShouldFn (component) -> boolean
@within Component
]=]
|
type ExtensionShouldFn = (any) -> boolean
|
--https://www.youtube.com/watch?v=5yvoNQoOvz0 db
| |
--User Settings
|
Speed_Units = "MPH" --MPH/KMH/SPS
|
--[[
configure(config: table): nil
Overrides default configuration keys to change how the Dev Module behaves.
Throws when trying to set a configuration key that does not exist.
The possible keys and their default values for the `config` table are:
-- Toggle the "body orientation" feature through this parameter
useBodyOrientation = true,
-- Body orientation uses a mix of waist and neck rotation, use this parameter to determine which of the two is
-- prevalent. It should be a number between 0 and 1: 1 means that only the waist rotates, 0 means that only the neck
-- rotates. A value of 0.5 performs an even mix of waist and neck rotation.
waistOrientationWeight = 0.5,
-- Toggle the "chat-triggered emotes" feature through this parameter
useChatAnimations = true,
-- "Chat emotes" comes with a default list of trigger words. Use this parameter to turn them off if you would rather
-- provide your own.
useDefaultTriggerWordsForChatEmotes = true,
]]
-- Example: configures "body orientation" to make waist rotation more pronounced, and disable the "chat emotes" feature
|
SocialInteractions.configure({
waistOrientationWeight = 0.75,
useChatAnimations = false,
})
|
--[[for x = 1, 50 do
s.Pitch = s.Pitch + 0.01
s:play()
wait(0.04)
end]]
|
for x = 100, 170 do
s:play()
wait(0.04)
end
for x = 100, 210 do
s.Pitch = s.Pitch - 0.0031
s:play()
wait(0.04)
end
wait()
end
|
--[[**
ensures Roblox FloatCurveKey type
@param value The value to check against
@returns True iff the condition is satisfied, false otherwise
**--]]
|
t.FloatCurveKey = t.typeof("FloatCurveKey")
|
--[[Shutdown]]
|
car.DriveSeat.ChildRemoved:connect(function(child)
if child.Name=="SeatWeld" and child:IsA("Weld") then
script.Parent:Destroy()
end
end)
|
-- listen to touches from each part
|
connectPart(center)
connectPart(top)
connectPart(bottom)
connectPart(left)
connectPart(right)
connectPart(front)
connectPart(back)
function rebuildStud(stud, cf)
stud.CFrame = cf
stud.Parent = beacon
stud:makeJoints()
end
|
-- Create component
|
local ImageButton = Roact.PureComponent:extend 'ImageButton'
|
--[[
@param Number Range The radius for which we will search for players (characters).
--]]
|
function Ownership:WaitForPlayerInRange(Range)
-- Check if there are actually players in game - if not, wait for a player to join
if #Players:GetPlayers() == 0 then
Players.PlayerAdded:Wait()
end
local Player;
repeat
for _, player in pairs(Players:GetPlayers()) do
if player and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
if (player.Character.HumanoidRootPart.Position - self.Model.PrimaryPart.Position).Magnitude <= Range then
Player = player
break
end
end
end
wait(0.1)
until Player or #Players:GetPlayers() == 0
-- The loop waits until either a Player has been found or there are no more players left in the game.
-- If no player was found, it means the other condition (no players in game) was triggered.
if not Player then
-- We (re-)call this method to make use of PlayerAdded:Wait() instead of a repeat-loop, for efficiency.
self:WaitForPlayerInRange(Range)
else
self:SetOwner(Player)
end
end
|
--[[
Evercyan @ March 2023
TooltipController
Require this module to show information under tooltips. Tooltips are floating text,
usually bits of information, relating to what the user is hovering over, such as
hovering over slots in the inventory.
]]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.