Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Player = game.Players.LocalPlayer
- local Character = Player.Character
- local Mouse = Player:GetMouse()
- script.Parent.Equipped:connect(function()
- local magnitude = (Character.HumanoidRootPart.Position - workspace.NexoBlue.Position).magnitude
- amount = 1
- currencyname = "Iron"
- debounce = false
- Mouse.Button1Down:connect(function()
- local health = game.ReplicatedStorage.Health
- local target = Mouse.Target
- if target then
- if magnitude <= 8 then
- if not debounce then
- debounce = true
- print('-1 de vida al nexo Blue')
- health.Value = health.Value - 1
- if health.Value > 0 then
- for i,v in pairs(game.Players:GetPlayers())do
- if v:FindFirstChild("leaderstats")and v then
- v.leaderstats[currencyname].Value = v.leaderstats[currencyname].Value + amount
- if target.Name == "NexoBlue" then
- for i = 0,1,0.1 do
- target.Transparency = i
- target.Decal1.Transparency = i
- target.Decal2.Transparency = i
- target.Decal3.Transparency = i
- target.Decal4.Transparency = i
- target.Decal5.Transparency = i
- target.Decal6.Transparency = i
- wait()
- end
- end
- end
- end
- wait(0.001)
- debounce = false
- target.Transparency = 0
- target.Decal1.Transparency = 0
- target.Decal2.Transparency = 0
- target.Decal3.Transparency = 0
- target.Decal4.Transparency = 0
- target.Decal5.Transparency = 0
- target.Decal6.Transparency = 0
- end
- else
- print("Your are too far from ur destination")
- end
- end
- end
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement