Advertisement
beginner0929

testing

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