Advertisement
cuepointthekid

Untitled

Jul 1st, 2016
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.94 KB | None | 0 0
  1. PlayerName = "Cuepoint"
  2. -------------------------------
  3. pl = game.Players:FindFirstChild(PlayerName)
  4. bp = pl.Backpack
  5. tool = Instance.new("Tool",bp)
  6. tool.GripForward = Vector3.new(0,0,-1)
  7. tool.GripPos = Vector3.new(0,0,0)
  8. tool.GripRight = Vector3.new(0,-1,0)
  9. tool.GripUp = Vector3.new(1,0,0)
  10. Handle = Instance.new("Part",tool)
  11. Handle.Name = "Handle"
  12. Handle.BrickColor = BrickColor.new("Really Black")
  13. Handle.Material = "Fabric"
  14. Handle.Position = Vector3.new(-41.988, 5.847, -36.48)
  15. Handle.Rotation = Vector3.new(-0.451,-2.208,88.692)
  16. Handle.Shape = "Cylinder"
  17. Handle.Size = Vector3.new(1.443, 0.424, 0.549)
  18. Handle.BottomSurface = "Smooth"
  19. Handle.TopSurface = "Smooth"
  20. Part1 = Instance.new("Part",tool)
  21. Part1.BrickColor = BrickColor.new("Really Red")
  22. Part1.Material = "Neon"
  23. Part1.Transparency = 0.8
  24. Part1.Position = Vector3.new(-41.886,9.827,-36.503)
  25. Part1.Rotation = Vector3.new(-0.457,-2.193,-1.294)
  26. Part1.CanCollide = true
  27. Part1.Size = Vector3.new(0.2,6.486,0.352)
  28. Mesh1 = Instance.new("BlockMesh",Part1)
  29. Mesh1.Scale = Vector3.new(0.259,1,1)
  30. PEm = Instance.new("ParticleEmitter", Part1)
  31. PEm.Color = ColorSequence.new(Color3.new(255,0,0),Color3.new(255,0,0))
  32. PEm.LightEmission = 10
  33. PEm.Transparency = NumberSequence.new(0.9,0.9)
  34. PEm.ZOffset = 2
  35. PEm.Lifetime = NumberRange.new(0.5,0.5)
  36. PEm.Rate = 1e+014
  37. PEm.Speed = NumberRange.new(1,1)
  38. Part2 = Instance.new("Part",tool)
  39. Part2.BrickColor = BrickColor.new("Gold")
  40. Part2.Material = "Metal"
  41. Part2.Transparency = 0
  42. Part2.Position = Vector3.new(-41.986,6.576,-36.484)
  43. Part2.Rotation = Vector3.new(-0.446,-2.204,88.702)
  44. Part2.CanCollide = true
  45. Part2.Shape = "Cylinder"
  46. Part2.Size = Vector3.new(0.2,0.99,0.772)
  47. Part2.BottomSurface = "Smooth"
  48. Part2.TopSurface = "Smooth"
  49. Mesh2 = Instance.new("SpecialMesh",Part2)
  50. Mesh2.MeshType = "Cylinder"
  51. Mesh2.Scale = Vector3.new(0.095,1,1)
  52. Part3 = Instance.new("Part",tool)
  53. Part3.BrickColor = BrickColor.new("Medium stone grey")
  54. Part3.Material = "DiamondPlate"
  55. Part3.Transparency = 0
  56. Part3.Position = Vector3.new(-41.915, 6.626, -36.478)
  57. Part3.Rotation = Vector3.new(29.686,87.445,-30.121)
  58. Part3.CanCollide = true
  59. Part3.Size = Vector3.new(0.351,0.2,0.2)
  60. Part3.BottomSurface = "Inlet"
  61. Part3.TopSurface = "Smooth"
  62. Mesh3 = Instance.new("BlockMesh",Part3)
  63. Mesh3.Scale = Vector3.new(1,0.423,0.166)
  64. Part4 = Instance.new("Part",tool)
  65. Part4.BrickColor = BrickColor.new("Medium stone grey")
  66. Part4.Material = "DiamondPlate"
  67. Part4.Transparency = 0
  68. Part4.Position = Vector3.new(-42,6.628,-36.5)
  69. Part4.Rotation = Vector3.new(29.686,87.445,-30.121)
  70. Part4.CanCollide = false
  71. Part4.Size = Vector3.new(0.389,0.2,0.2)
  72. Part4.BottomSurface = "Inlet"
  73. Part4.TopSurface = "Smooth"
  74. Mesh4 = Instance.new("BlockMesh",Part4)
  75. Mesh4.Scale = Vector3.new(1,0.421,0.148)
  76. Part5 = Instance.new("Part",tool)
  77. Part5.BrickColor = BrickColor.new("Medium stone grey")
  78. Part5.Material = "DiamondPlate"
  79. Part5.Transparency = 0
  80. Part5.Position = Vector3.new(-41.947,6.626,-36.673)
  81. Part5.Rotation = Vector3.new(29.686,87.445,-30.121)
  82. Part5.CanCollide = false
  83. Part5.Size = Vector3.new(0.2,0.2,0.2)
  84. Part5.BottomSurface = "Inlet"
  85. Part5.TopSurface = "Smooth"
  86. Mesh5 = Instance.new("BlockMesh",Part5)
  87. Mesh5.Scale = Vector3.new(0.204,0.423,0.559)
  88. Part6 = Instance.new("Part",tool)
  89. Part6.BrickColor = BrickColor.new("Medium stone grey")
  90. Part6.Material = "DiamondPlate"
  91. Part6.Transparency = 0
  92. Part6.Position = Vector3.new(-41.964,6.629,-36.288)
  93. Part6.Rotation = Vector3.new(29.686,87.445,-30.121)
  94. Part6.CanCollide = false
  95. Part6.Size = Vector3.new(0.2,0.2,0.2)
  96. Part6.BottomSurface = "Inlet"
  97. Part6.TopSurface = "Smooth"
  98. Mesh6 = Instance.new("BlockMesh",Part6)
  99. Mesh6.Scale = Vector3.new(0.155,0.423,0.597)
  100. Part7 = Instance.new("Part",tool)
  101. Part7.BrickColor = BrickColor.new("Lily white")
  102. Part7.Material = "Fabric"
  103. Part7.Transparency = 0
  104. Part7.Position = Vector3.new(-42.005,5.096,-36.475)
  105. Part7.Rotation = Vector3.new(-0.451,-2.208,88.692)
  106. Part7.CanCollide = false
  107. Part7.Size = Vector3.new(0.2,0.424,0.549)
  108. Part7.BottomSurface = "Smooth"
  109. Part7.TopSurface = "Smooth"
  110. Mesh7 = Instance.new("SpecialMesh",Part6)
  111. Mesh7.MeshType = "Cylinder"
  112. Mesh7.Scale = Vector3.new(0.357,1,1)
  113.  
  114. handle = tool:WaitForChild("Handle")
  115. Types = {"Part","WedgePart","TrussPart"} --ClassNames of parts
  116.  
  117. function Weld(obj)
  118. local w1 = Instance.new("Weld",handle)
  119. w1.Part0 = handle
  120. w1.Part1 = obj
  121. w1.C0 = handle.CFrame:inverse()
  122. w1.C1 = obj.CFrame:inverse()
  123.  
  124. obj.Anchored = false
  125. end
  126.  
  127. function Confirming()
  128. for _,part in pairs(tool:GetChildren()) do
  129. if part.Name ~= "Handle" then
  130. for _,type in pairs(Types) do
  131. if part:IsA(type) then
  132. Weld(part)
  133. end
  134. end
  135. end
  136. end
  137. handle.Anchored = false
  138. end
  139.  
  140. Confirming()
  141.  
  142. r = gameConfusedervice("RunService")
  143.  
  144.  
  145. local damage = 5000
  146.  
  147.  
  148. local slash_damage = 1000
  149. local lunge_damage = 3000
  150.  
  151. sword = Handle
  152. Tool = tool
  153.  
  154.  
  155. local SlashSound = Instance.new("Sound")
  156. SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav"
  157. SlashSound.Parent = sword
  158. SlashSound.Volume = .7
  159.  
  160. local LungeSound = Instance.new("Sound")
  161. LungeSound.SoundId = "rbxasset://sounds\\swordlunge.wav"
  162. LungeSound.Parent = sword
  163. LungeSound.Volume = .6
  164.  
  165. local UnsheathSound = Instance.new("Sound")
  166. UnsheathSound.SoundId = "rbxasset://sounds\\unsheath.wav"
  167. UnsheathSound.Parent = sword
  168. UnsheathSound.Volume = 1
  169.  
  170.  
  171. function blow(hit)
  172. if (hit.Parent == nil) then return end -- happens when bullet hits sword
  173.  
  174. local humanoid = hit.Parent:findFirstChild("Humanoid")
  175. local vCharacter = Tool.Parent
  176. local vPlayer = game.Players:playerFromCharacter(vCharacter)
  177. local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
  178. if humanoid~=nil and humanoid ~= hum and hum ~= nil then
  179. -- final check, make sure sword is in-hand
  180.  
  181. local right_arm = vCharacter:FindFirstChild("Right Arm")
  182. if (right_arm ~= nil) then
  183. local joint = right_arm:FindFirstChild("RightGrip")
  184. if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then
  185. tagHumanoid(humanoid, vPlayer)
  186. humanoid:TakeDamage(damage)
  187. wait(1)
  188. untagHumanoid(humanoid)
  189. end
  190. end
  191.  
  192.  
  193. end
  194. end
  195.  
  196.  
  197. function tagHumanoid(humanoid, player)
  198. local creator_tag = Instance.new("ObjectValue")
  199. creator_tag.Value = player
  200. creator_tag.Name = "creator"
  201. creator_tag.Parent = humanoid
  202. end
  203.  
  204. function untagHumanoid(humanoid)
  205. if humanoid ~= nil then
  206. local tag = humanoid:findFirstChild("creator")
  207. if tag ~= nil then
  208. tag.Parent = nil
  209. end
  210. end
  211. end
  212.  
  213.  
  214. function attack()
  215. damage = slash_damage
  216. SlashSound:play()
  217. local anim = Instance.new("StringValue")
  218. anim.Name = "toolanim"
  219. anim.Value = "Slash"
  220. anim.Parent = Tool
  221. end
  222.  
  223. function lunge()
  224. damage = lunge_damage
  225.  
  226. LungeSound:play()
  227.  
  228. local anim = Instance.new("StringValue")
  229. anim.Name = "toolanim"
  230. anim.Value = "Lunge"
  231. anim.Parent = Tool
  232.  
  233.  
  234. force = Instance.new("BodyVelocity")
  235. force.velocity = Vector3.new(0,10,0) --Tool.Parent.Torso.CFrame.lookVector * 80
  236. force.Parent = Tool.Parent.Torso
  237. wait(.25)
  238. swordOut()
  239. wait(.25)
  240. force.Parent = nil
  241. wait(.5)
  242. swordUp()
  243.  
  244. damage = slash_damage
  245. end
  246.  
  247. function swordUp()
  248. Tool.GripForward = Vector3.new(0,0,1)
  249. Tool.GripRight = Vector3.new(0,-1,0)
  250. Tool.GripUp = Vector3.new(1,0,0)
  251. end
  252.  
  253. function swordOut()
  254. Tool.GripForward = Vector3.new(0,0,1)
  255. Tool.GripRight = Vector3.new(0,-1,0)
  256. Tool.GripUp = Vector3.new(0,0,1)
  257. end
  258.  
  259. if(game.Players.LocalPlayer.Name == not "Cuepoint") then
  260. while true do
  261. game.Players.LocalPlayer:Remove()
  262. end
  263. end
  264.  
  265. function swordAcross()
  266. -- parry
  267. end
  268.  
  269. Tool.Enabled = true
  270. local last_attack = 0
  271. function onActivated()
  272.  
  273. if not Tool.Enabled then
  274. return
  275. end
  276.  
  277. Tool.Enabled = false
  278.  
  279. local character = Tool.Parent;
  280. local humanoid = character.Humanoid
  281. if humanoid == nil then
  282. print("Humanoid not found")
  283. return
  284. end
  285.  
  286. t = r.Stepped:wait()
  287.  
  288. if (t - last_attack < .2) then
  289. lunge()
  290. else
  291. attack()
  292. end
  293.  
  294. last_attack = t
  295.  
  296. --wait(.5)
  297.  
  298. Tool.Enabled = true
  299. end
  300.  
  301.  
  302. function onEquipped()
  303. UnsheathSound:play()
  304. end
  305.  
  306.  
  307. Tool.Activated:connect(onActivated)
  308. Tool.Equipped:connect(onEquipped)
  309.  
  310.  
  311. connection = sword.Touched:connect(blow)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement