beginner0929

testing

Dec 13th, 2019
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.23 KB | None | 0 0
  1. wait(0.2)
  2.  
  3. UIS = game:GetService("UserInputService")
  4. mouse = game.Players.Beginner0929:GetMouse()
  5.  
  6. bonezones = Instance.new("Folder")
  7. bonezones.Parent = game.ReplicatedStorage
  8. Events = Instance.new("Folder")
  9. Events.Parent = game.ReplicatedStorage
  10. BoneZone = Instance.new("RemoteEvent")
  11. BoneZone.Parent = game.ReplicatedStorage.Events
  12. frame = Instance.new("Part")
  13. frame.CanCollide = false
  14. frame.Size = Vector3.new(2,0.5,2)
  15. frame.Color = BrickColor.new("Really red")
  16. frame.TopSurface = Enum.SurfaceType.Smooth
  17. frame.BottomSurface = Enum.SurfaceType.Smooth
  18. frame.Parent = bonezones
  19. frame:Clone()
  20. Framebone = Instance.new("Part")
  21. frame.CanCollide = false
  22. Framebone.Size = Vector3.new(1,2.78,0.75)
  23. specialmesh = Instance.new("SpecialMesh")
  24. specialmesh.MeshId = "rbxassetid://465130937"
  25. specialmesh.Parent = Framebone
  26. specialmesh.Scale = Vector3.new(1,2.78,0.75)
  27. Framebone:Clone()
  28. sound = Instance.new("Sound")
  29. sound.Parent = frame
  30. sound.SoundId = "rbxassetid://401680588"
  31.  
  32.  
  33. UIS.InputBegan:Connect(function(key, processed)
  34.  
  35.  
  36. if processed then return end
  37.  
  38. if key.UserInputType == Enum.UserInputType.Keyboard then
  39. if key.KeyCode == Enum.KeyCode.R then
  40.  
  41.  
  42. game.ReplicatedStorage.Events.BoneZone:FireServer(mouse.Hit.X, mouse.Hit.Y, mouse.Hit.Z)
  43.  
  44. game.ReplicatedStorage.Events.BoneZone.OnServerEvent:Connect(function(player, mouseX, mouseY, mouseZ)
  45. frame.Position = Vector3.new(mouseX,mouseY,mouseZ)
  46. frame.Parent = workspace
  47. frame.Anchored = true
  48. sound:Play()
  49. frame.Transparency = 0
  50. wait(0.1)
  51. frame.Transparency = 1
  52. wait(0.1)
  53. frame.Transparency = 0
  54. wait(0.1)
  55. frame.Transparency = 1
  56. wait(0.1)
  57. frame.Transparency = 0
  58. wait(0.1)
  59. frame.Transparency = 1
  60. wait(0.1)
  61. frame.Transparency = 0
  62. wait(0.1)
  63. frame.Transparency = 1
  64.  
  65. wait(0.2)
  66. Framebone.Position = frame.Position + Vector3.new(0,-1,0)
  67. Framebone.Parent = workspace
  68. Framebone.Anchored = true
  69.  
  70. Framebone.Touched:Connect(function(hit)
  71. if hit.Parent:FindFirstChild("Humanoid") then
  72. hit.Parent:FindFirstChild("Humanoid"):TakeDamage(5)
  73. wait(1)
  74. frame:Destroy()
  75. Framebone:Destroy()
  76.  
  77.  
  78. end
  79. end)
  80.  
  81. end)
  82. end
  83. end
  84. end)
Add Comment
Please, Sign In to add comment