of     1   

jovkon123
#227517784Monday, November 13, 2017 1:24 PM GMT

math.randomseed(tick()) local ReplicatedStorage = game:GetService("ReplicatedStorage") local punchEvent = Instance.new("RemoteEvent", ReplicatedStorage) punchEvent.Name = "PunchEvent" local animations = {117###############################changed because the animations made by me won't work for other people than me. Make your own and insert the id's here, separated by commas. local function onPunchFired(plr) local char = game.Workspace:FindFirstChild(plr.Name) local humanoid = char.Humanoid local animation = Instance.new("Animation") local picked = math.random(1, #animations) animation.AnimationId = "h################################################## local animTrack = humanoid:LoadAnimation(animation) animTrack:Play() local dmgScript = script.DmgScript:Clone() if picked == 1 then dmgScript.Parent = char.RightHand elseif picked == 2 then dmgScript.Parent = char.LeftHand end dmgScript.Disabled = false wait(0.4) dmgScript:Destroy() end --------------- amount = 3 -- amount of views each time timedelay = 2 --amount of seconds in between each view gain currencyname = "Views" --name of currency local function afterPunchFired(plr) for i,v in pairs(game.Players:GetPlayers()) do if v:FindFirstChild('leaderstats') then v.leaderstats[currencyname].Value = v.leaderstats[currencyname].Value + amount end end end punchEvent.OnServerEvent:Connect(onPunchFired) punchEvent.OnServerEvent:Connect(afterPunchFired) this is the script its a script for when you punch u get currency, but i need it to be only for 1 player cuz with this one when you punch everyone gets the currency not only you -Jovkon -Jovkon

    of     1