Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local whostoucha = {} -- put this somewhere in the attack itself (smaller scope = less memory usage)
- obj.Touched:Connect(function() end) -- causes the object to think about whats touching it (having a func is ok too)
- coroutine.wrap(function()
- while true do -- do this forever:
- for _, i in ipairs(bigw:GetTouchingParts()) do -- look at the touching parts and for each:
- local humanoid = i.Parent:FindFirstChild("Humanoid") -- take the toucher's character and find a humanoid
- if humanoid == args[1].Humanoid then -- if the found humanoid is the boss' then:
- humanoid = false -- ignore it ("unfind" it and dont care)
- end -- end
- if humanoid then -- if you found the humanoid then:
- whostoucha[humanoid] = true -- index it in the dictionary
- end -- end
- end -- end
- -- OUR TABLE LOOKS LIKE THIS RIGHT NOW:
- -- {Humanoid1 = true,
- -- Humanoid2 = true,
- -- Humanoid3 = true}
- -- ok go back to the script lol
- -- koishi sucks
- for humanoid in pairs(whostoucha) do -- for each humanoid in the dictionary:
- humanoid:TakeDamage(num) -- they take damage
- if humanoid.Sit ~= true then -- insert a function here if you want (i have sit)
- humanoid.Sit = math.random(1,5) == 1 and true or false
- end
- end -- end
- table.clear(whostoucha) -- clear the dictionary
- wait(1) -- THIS WILL HAPPEN EVERY 1 SECOND
- end -- end
- end)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement