Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function drop() -- Making a drop function
- local maths = math.random(1, 6) -- change 6 to however many nothings and tools you have (Right now its a 1 in 6 chance of dropping the tool)
- local tool = game.ReplicatedStorage.Tools:FindFirstChild("StarBucks") -- Finding the tool
- local nothing = game.ReplicatedStorage.Tools:FindFirstChild("Nothing") -- Finding Nothing
- if maths == 1 then -- The rest of the lines determin which is chosen
- local toolc = tool:Clone()
- toolc.Parent = game.Workspace
- toolc.Handle.CFrame = script.Parent.Head.CFrame + Vector3.new(5,2,0) -- Making the "Tool" Spawn near the Enemy
- script:remove()
- else if maths == 2 then
- local nothingc = nothing:Clone()
- nothingc.Parent = game.Workspace
- nothingc.Handle.CFrame = script.Parent.Head.CFrame + Vector3.new(0,-200,0) -- making the "Nothing" Spawn under the map
- script:remove()
- else if maths == 3 then
- local nothingc = nothing:Clone()
- nothingc.Parent = game.Workspace
- nothingc.Handle.CFrame = script.Parent.Head.CFrame + Vector3.new(0,-200,0)
- script:remove()
- else if maths == 4 then
- local nothingc = nothing:Clone()
- nothingc.Parent = game.Workspace
- nothingc.Handle.CFrame = script.Parent.Head.CFrame + Vector3.new(0,-200,0)
- script:remove()
- else if maths == 5 then
- local nothingc = nothing:Clone()
- nothingc.Parent = game.Workspace
- nothingc.Handle.CFrame = script.Parent.Head.CFrame + Vector3.new(0,-200,0)
- script:remove()
- else if maths == 6 then
- local nothingc = nothing:Clone()
- nothingc.Parent = game.Workspace
- nothingc.Handle.CFrame = script.Parent.Head.CFrame + Vector3.new(0,-200,0)
- script:remove()
- end
- end
- end
- end
- end
- end
- end
- while true do -- Loop
- wait(.1)
- if (script.Parent.Enemy.Health <1) then -- If the Enemy dies (Change Enemy to whatever the enemys Humanoid is named)
- drop() -- calling the drop function
- end
- end
Add Comment
Please, Sign In to add comment