Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local fflength = 5
- local unlimited = false
- function onNewChild(obj, char)
- if obj:IsA("Tool") then
- for i, v in pairs(char:GetChildren()) do
- if v:IsA("ForceField") then
- v:Remove()
- end
- end
- end
- end
- function onSpawn(newCharacter)
- ff = Instance.new("ForceField",newCharacter)
- if unlimited == false then
- game.Debris:AddItem(ff, fflength)
- end
- newCharacter.ChildAdded:connect(function(child) onNewChild(child,newCharacter) end)
- end
- function onPlayerAdded(newPlayer)
- newPlayer.CharacterAdded:connect(onSpawn)
- end
- game.Players.PlayerAdded:connect(onPlayerAdded)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement