Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uis = game:GetService("UserInputService")
- cg = game:GetService("CoreGui")
- sg = game:GetService("StarterGui")
- wp = game:GetService("Workspace")
- cmr = wp.Camera
- rs = game:GetService("ReplicatedStorage")
- rsd = game:GetService("RunService").RenderStepped
- lgt = game:GetService("Lighting")
- plrs = game:GetService("Players")
- lplr = plrs.LocalPlayer
- mouse = lplr:GetMouse()
- virtualUser = game:GetService("VirtualUser")
- if _G.hitBoxSize == nil then
- _G.hitBoxSize = {3, 3, 3}
- _G.hitBoxBody = "Head"
- _G.hitBoxColor = "Really blue"
- _G.hitBoxTransparency = 0.9
- -- HumanoidRootPart
- end
- function createHitBox(parent)
- local sizeBody = parent.Character[_G.hitBoxBody].Size.x
- parent.Character[_G.hitBoxBody].Size = Vector3.new(_G.hitBoxSize[1], _G.hitBoxSize[2], _G.hitBoxSize[3])
- parent.Character[_G.hitBoxBody].Transparency = _G.hitBoxTransparency
- parent.Character[_G.hitBoxBody].BrickColor = BrickColor.new(_G.hitBoxColor)
- parent.Character[_G.hitBoxBody].Material = "Neon"
- parent.Character[_G.hitBoxBody].CanCollide = false
- parent.Character[_G.hitBoxBody].Changed:connect(
- function(property)
- wait(0.1)
- if property == "Size" or property == "CanCollide" then
- parent.Character[_G.hitBoxBody].Size = Vector3.new(_G.hitBoxSize[1], _G.hitBoxSize[2], _G.hitBoxSize[3])
- parent.Character[_G.hitBoxBody].CanCollide = false
- end
- end
- )
- end
- function hitBox()
- for _, o in pairs(plrs:GetPlayers()) do
- if o.Name ~= lplr.Name then
- o.CharacterAdded:Connect(
- function(characterModel)
- if characterModel:WaitForChild(_G.hitBoxBody) then
- wait(0.5)
- createHitBox(o)
- end
- end
- )
- end
- end
- plrs.PlayerAdded:Connect(
- function(newPlayer)
- newPlayer.CharacterAdded:Connect(
- function(characterModel)
- if characterModel:WaitForChild(_G.hitBoxBody) then
- wait(0.5)
- createHitBox(newPlayer)
- end
- end
- )
- end
- )
- for _, o in pairs(plrs:GetPlayers()) do
- if o.Name ~= lplr.Name then
- spawn(
- function()
- if o.Character:FindFirstChild(_G.hitBoxBody) then
- wait(0.1)
- createHitBox(o)
- end
- end
- )
- end
- end
- end
- hitBox()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement