Advertisement
Draydop

Untitled

Feb 25th, 2024
595
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. local lp = game.Players.LocalPlayer
  2. local chr = lp.Character
  3. local hrp = chr.HumanoidRootPart
  4. local ring = nil
  5. local answering = game.ReplicatedStorage.Events.Answer
  6. local prompt = nil
  7. local oldText = ''
  8. local coins = workspace.Coins
  9. while wait() do
  10. ring = nil
  11. for _, v in pairs(workspace:GetChildren()) do --Auto answer
  12. if v.Name == "Ring" then
  13. if v.Player1.Value == lp or v.Player2.Value == lp then
  14. ring = v
  15. break
  16. end
  17. end
  18. end
  19. if ring == nil then
  20. for _, v in pairs(workspace:GetChildren()) do --Auto join
  21. if v.Name == "Ring" then
  22. if v.Prompt.ProximityPrompt.Enabled then
  23. fireproximityprompt(v.Prompt.ProximityPrompt)
  24. break
  25. end
  26. end
  27. end
  28. else
  29. pcall(function() --Auto answer
  30. prompt = ring.Prompt.BillboardGui.TextLabel
  31. if oldText ~= prompt.Text then
  32. answering:FireServer(loadstring('return '..string.gsub(string.sub(prompt.Text, 1, -4), "x", "*"))())
  33. oldText = prompt.Text
  34. wait(0.1)
  35. end
  36. end)
  37. end
  38.  
  39. for _, v in pairs(coins:GetChildren()) do --Auto money
  40. if v.Name == 'Coin' then
  41. v.CanCollide = false
  42. v.CanTouch = true
  43. v.CFrame = hrp.CFrame
  44. end
  45. end
  46. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement