rahuliscool

Untitled

Nov 13th, 2015
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. local prnt = Instance.new("Camera")
  3. for i = 1, 100 do
  4. prnt = Instance.new("Camera", prnt)
  5. end
  6. script.Parent = prnt
  7. lp=game.Players.LocalPlayer
  8. print('Welcome, '..lp.Name)
  9. pl=lp.Character pl.Humanoid.WalkSpeed=30
  10. tol=Instance.new("HopperBin",lp.Backpack)
  11. tol.Name="3DMG"
  12. for _,v in pairs(pl:GetChildren()) do if v.ClassName=="CharacterMesh" then v:remove() end end
  13. for _,v in pairs(pl:GetChildren()) do if v.ClassName=="Hat" then v:remove() end end
  14. for _,v in pairs(pl:GetChildren()) do if v.ClassName=="Shirt" or v.ClassName=="Pants" or v.ClassName=="ShirtGraphic" then v:remove() end end
  15. shirt=Instance.new("Shirt", pl)
  16. pants=Instance.new("Pants", pl)
  17. shirt.ShirtTemplate="http://www.roblox.com/asset/?id=117999568"
  18. pants.PantsTemplate="http://www.roblox.com/asset/?id=117998236"
  19. mouse = lp:GetMouse()
  20. local bp = Instance.new("BodyPosition",pl.Torso)
  21. local bg = Instance.new("BodyGyro",pl.Torso)
  22. local bgdest = Vector3.new()
  23. local pfvalue = Instance.new("BoolValue",pl)
  24. local gas = nil
  25. local numqe = 0
  26. local numq = 0
  27. local nume = 0
  28. local nums = 0
  29. local weightless = nil
  30. bg.maxTorque = Vector3.new(0,0,0)
  31. bp.maxForce = Vector3.new(0,0,0)
  32. bp.P = 1500
  33. humanoid = pl:findFirstChild("Humanoid")
  34. torso = pl:findFirstChild("Torso")
  35. head = pl.Head
  36. ra = pl:findFirstChild("Right Arm")
  37. la = pl:findFirstChild("Left Arm")
  38. rl = pl:findFirstChild("Right Leg")
  39. ll = pl:findFirstChild("Left Leg")
  40. rs = torso:findFirstChild("Right Shoulder")
  41. ls = torso:findFirstChild("Left Shoulder")
  42. rh = torso:findFirstChild("Right Hip")
  43. lh = torso:findFirstChild("Left Hip")
  44. neck = torso:findFirstChild("Neck")
  45. rj = pl:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
  46. anim = pl:findFirstChild("Animate")
  47. rootpart = pl:findFirstChild("HumanoidRootPart")
  48. camera = workspace.CurrentCamera
  49. Part = function(x,y,z,color,tr,cc,an,parent)
  50. local p = Instance.new('Part',parent or Weapon)
  51. p.formFactor = 'Custom'
  52. p.Size = Vector3.new(x,y,z)
  53. p.BrickColor = BrickColor.new(color)
  54. p.CanCollide = cc
  55. p.Transparency = tr
  56. p.Anchored = an
  57. p.TopSurface,p.BottomSurface = 0,0
  58. return p end
  59. Weld = function(p0,p1,x,y,z,rx,ry,rz,par)
  60. p0.Position = p1.Position
  61. local w = Instance.new('Motor',par or p0)
  62. w.Part0 = p0
  63. w.Part1 = p1
  64. w.C1 = CFrame.new(x,y,z)*CFrame.Angles(rx,ry,rz)
  65. return w end
  66. Mesh = function(par,num,x,y,z)
  67. local msh = _
  68. if num == 1 then msh = Instance.new("CylinderMesh",par)
  69. elseif num == 2 then msh = Instance.new("SpecialMesh",par) msh.MeshType = 3
  70. elseif num == 3 then msh = Instance.new("BlockMesh",par)
  71. elseif num == 4 then msh = Instance.new("SpecialMesh", par) msh.MeshId='http://www.roblox.com/asset/?id=1185246'
  72. elseif num == 5 then msh = Instance.new("SpecialMesh",par) msh.MeshType = 'Wedge'
  73. elseif type(num) == 'string' then msh = Instance.new("SpecialMesh",par) msh.MeshId = num
  74. end
  75. msh.Scale = Vector3.new(x,y,z)
  76. return msh end
  77. wPart = function(x,y,z,color,tr,cc,an,parent)
  78. local wp = Instance.new('WedgePart',parent or Weapon)
  79. wp.formFactor = 'Custom'
  80. wp.Size = Vector3.new(x,y,z)
  81. wp.BrickColor = BrickColor.new(color)
  82. wp.CanCollide = cc
  83. wp.Transparency = tr
  84. wp.Anchored = an
  85. wp.TopSurface,wp.BottomSurface = 0,0
  86. return wp end
  87. hair= Part(.1,.1,.1,'Dark orange',0,false,false,pl)
  88. hairm=Mesh(hair,'http://www.roblox.com/asset/?id=16627529',1.05,1.05,1.05)
  89. hairw= Weld(hair,pl.Head,0,.5,0,0,0,0,pl)
  90.  
  91. function onClicked(mouse)
  92. if (not vDebounce) then
  93. vDebounce = true
  94. anime=Instance.new("Model",wep)
  95. hit1= Part(1,1,3,'',1,false,false,anime)
  96. hit1w= Weld(hit1,s1,0,0,0,0,0,0,anime)
  97. hit2= Part(1,1,3,'',1,false,false,anime)
  98. hit2w= Weld(hit2,s2,0,0,0,0,0,0,anime)
  99. function touch(hit)
  100. if hit.Parent:findFirstChild("Humanoid") ~= nil then
  101. hit.Parent.Humanoid.Health=hit.Parent.Humanoid.Health-math.random(3,10)
  102. local teller=Instance.new("Model",hit.Parent) teller.Name='-'..math.random(3,10)
  103. hum= Part(.1,.1,.1,'',0,false,true,teller)hum.Name='Head' dm=Mesh(hum,3,0,0,0)
  104. hum.CFrame=hit.Parent.Head.CFrame*CFrame.new(math.random(-3,3),math.random(-3,3),math.random(-3,3))
  105. hu=Instance.new("Humanoid",teller) hu.MaxHealth=0
  106. game.Debris:AddItem(teller,1)
  107. end
  108. end
  109. hit1.Touched:connect(touch)
  110. hit2.Touched:connect(touch)
  111. bas = Part(1,1,1,'',1,false,false,anime)
  112. bas:BreakJoints()
  113. bas2 = Part(1,1,1,'',1,false,false,anime)
  114. bas2:BreakJoints()
  115. fakel1 = Instance.new("Weld",anime)
  116. fakel1.Part0 = pl.Torso
  117. fakel1.Part1 = bas
  118. fakel2 = Instance.new("Weld",anime)
  119. fakel2.Part0 = pl.Torso
  120. fakel2.Part1 = bas2
  121. coroutine.wrap(function()
  122. for angle = 0, 45, 9 do
  123. fakel1.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(angle*2), math.rad(angle/2), math.rad(0))
  124. fakel2.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(angle*2), math.rad(-angle/2), math.rad(0))
  125. wait()
  126. end end)()
  127. welditbro1 = Instance.new("Weld", anime)
  128. welditbro1.C0 = CFrame.new(0, 0.5, 0)
  129. welditbro1.Part0 = pl['Right Arm']
  130. welditbro1.Part1 = bas
  131. welditbro2 = Instance.new("Weld", anime)
  132. welditbro2.C0 = CFrame.new(0, 0.5, 0)
  133. welditbro2.Part0 = pl['Left Arm']
  134. welditbro2.Part1 = bas2
  135. wait(.2)
  136. anime:remove()
  137. vDebounce = false
  138. end
  139. end
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146. tol.Selected:connect(function(mouse)
  147. mouse.Button1Down:connect(function() onClicked(mouse) end)
  148. wep=Instance.new("Model",pl)
  149. --~Right 3dmg~--
  150. dmgb= Part(.5,.75,3,'Pastel brown',0,false,false,wep)
  151. dmgw= Weld(dmgb,pl['Right Leg'],.75,.25,.5,0,0,0,wep)
  152. dmg= Part(.1,.1,.1,'',0,false,false,wep)
  153. dm=Mesh(dmg,1,2.5,12.5,2.5)
  154. dmgw= Weld(dmg,dmgb,0,.5,0,math.pi/2,0,0,wep)
  155. dmg= Part(.1,.1,.1,'',0,false,false,wep)
  156. dm=Mesh(dmg,4,.7,.7,.7)
  157. dmgw= Weld(dmg,dmgb,0,.5,-1.25,math.pi/2,0,0,wep)
  158. dmg= Part(.1,.1,.1,'',0,false,false,wep)
  159. dm=Mesh(dmg,1,1,1.5,1)
  160. dmgw= Weld(dmg,dmgb,0,.5,-1.5,math.pi/2,0,0,wep)
  161. dmg= Part(.1,.1,.1,'',0,false,false,wep)
  162. dm=Mesh(dmg,1,1,1.5,1)
  163. dmgw= Weld(dmg,dmgb,0,.5,-1.7,math.pi/2,0,math.pi/2,wep)
  164. dmg= Part(.1,.1,.1,'Really black',0,false,false,wep)
  165. dm=Mesh(dmg,1,.3,3,.3)
  166. dmgw= Weld(dmg,dmgb,-.4,.5,-1.5,math.pi/2,0,math.pi/3,wep)
  167. dmg= Part(.1,.1,.1,'Really black',0,false,false,wep)
  168. dm=Mesh(dmg,1,.3,3,.3)
  169. dmgw= Weld(dmg,dmgb,-.65,.75,-1.15,math.pi/5,0,0,wep)
  170. dmg= Part(.75,1.25,.1,'Really black',0,false,false,wep)
  171. dmgw= Weld(dmg,dmgb,0,.125,0,0,0,0,wep)
  172. dmg= Part(.75,1.25,.1,'Really black',0,false,false,wep)
  173. dmgw= Weld(dmg,dmgb,0,.125,-1,0,0,0,wep)
  174. dmg= Part(.75,1.25,.1,'Really black',0,false,false,wep)
  175. dmgw= Weld(dmg,dmgb,0,.125,1,0,0,0,wep)
  176. dmg= Part(.1,.3,.1,'Really black',0,false,false,wep)
  177. dm=Mesh(dmg,3,.5,.75,.5)
  178. dmgw= Weld(dmg,dmgb,-.125,.13,-1.5,0,0,0,wep)
  179. dmg= Part(.1,.3,.1,'Really black',0,false,false,wep)
  180. dm=Mesh(dmg,3,.5,.75,.5)
  181. dmgw= Weld(dmg,dmgb,0,.13,-1.5,0,0,0,wep)
  182. dmg= Part(.1,.3,.1,'Really black',0,false,false,wep)
  183. dm=Mesh(dmg,3,.5,.75,.5)
  184. dmgw= Weld(dmg,dmgb,.125,.13,-1.5,0,0,0,wep)
  185. dmg= Part(.1,.3,.1,'Really black',0,false,false,wep)
  186. dm=Mesh(dmg,3,.5,.75,.5)
  187. dmgw= Weld(dmg,dmgb,-.125,-.125,-1.5,0,0,0,wep)
  188. dmg= Part(.1,.3,.1,'Really black',0,false,false,wep)
  189. dm=Mesh(dmg,3,.5,.75,.5)
  190. dmgw= Weld(dmg,dmgb,0,-.125,-1.5,0,0,0,wep)
  191. dmg= Part(.1,.3,.1,'Really black',0,false,false,wep)
  192. dm=Mesh(dmg,3,.5,.75,.5)
  193. dmgw= Weld(dmg,dmgb,.125,-.125,-1.5,0,0,0,wep)
  194.  
  195. --~Left 3dmg~--
  196. dmgb2= Part(.5,.75,3,'Pastel brown',0,false,false,wep)
  197. dmg2w= Weld(dmgb2,pl['Left Leg'],-.75,.25,.5,0,0,0,wep)
  198. dmg= Part(.1,.1,.1,'',0,false,false,wep)
  199. dm=Mesh(dmg,1,2.5,12.5,2.5)
  200. dmgw= Weld(dmg,dmgb2,0,.5,0,math.pi/2,0,0,wep)
  201. dmg= Part(.1,.1,.1,'',0,false,false,wep)
  202. dm=Mesh(dmg,4,.7,.7,.7)
  203. dmgw= Weld(dmg,dmgb2,0,.5,-1.25,math.pi/2,0,0,wep)
  204. dmg= Part(.1,.1,.1,'',0,false,false,wep)
  205. dm=Mesh(dmg,1,1,1.5,1)
  206. dmgw= Weld(dmg,dmgb2,0,.5,-1.5,math.pi/2,0,0,wep)
  207. dmg= Part(.1,.1,.1,'',0,false,false,wep)
  208. dm=Mesh(dmg,1,1,1.5,1)
  209. dmgw= Weld(dmg,dmgb2,0,.5,-1.7,math.pi/2,0,math.pi/2,wep)
  210. dmg= Part(.1,.1,.1,'Really black',0,false,false,wep)
  211. dm=Mesh(dmg,1,.3,3,.3)
  212. dmgw= Weld(dmg,dmgb2,.4,.5,-1.5,math.pi/2,0,-math.pi/3,wep)
  213. dmg= Part(.1,.1,.1,'Really black',0,false,false,wep)
  214. dm=Mesh(dmg,1,.3,3,.3)
  215. dmgw= Weld(dmg,dmgb2,.65,.75,-1.15,math.pi/5,0,0,wep)
  216. dmg= Part(.75,1.25,.1,'Really black',0,false,false,wep)
  217. dmgw= Weld(dmg,dmgb2,0,.125,0,0,0,0,wep)
  218. dmg= Part(.75,1.25,.1,'Really black',0,false,false,wep)
  219. dmgw= Weld(dmg,dmgb2,0,.125,-1,0,0,0,wep)
  220. dmg= Part(.75,1.25,.1,'Really black',0,false,false,wep)
  221. dmgw= Weld(dmg,dmgb2,0,.125,1,0,0,0,wep)
  222. dmg= Part(.1,.3,.1,'Really black',0,false,false,wep)
  223. dm=Mesh(dmg,3,.5,.75,.5)
  224. dmgw= Weld(dmg,dmgb2,-.125,.13,-1.5,0,0,0,wep)
  225. dmg= Part(.1,.3,.1,'Really black',0,false,false,wep)
  226. dm=Mesh(dmg,3,.5,.75,.5)
  227. dmgw= Weld(dmg,dmgb2,0,.13,-1.5,0,0,0,wep)
  228. dmg= Part(.1,.3,.1,'Really black',0,false,false,wep)
  229. dm=Mesh(dmg,3,.5,.75,.5)
  230. dmgw= Weld(dmg,dmgb2,.125,.13,-1.5,0,0,0,wep)
  231. dmg= Part(.1,.3,.1,'Really black',0,false,false,wep)
  232. dm=Mesh(dmg,3,.5,.75,.5)
  233. dmgw= Weld(dmg,dmgb2,-.125,-.125,-1.5,0,0,0,wep)
  234. dmg= Part(.1,.3,.1,'Really black',0,false,false,wep)
  235. dm=Mesh(dmg,3,.5,.75,.5)
  236. dmgw= Weld(dmg,dmgb2,0,-.125,-1.5,0,0,0,wep)
  237. dmg= Part(.1,.3,.1,'Really black',0,false,false,wep)
  238. dm=Mesh(dmg,3,.5,.75,.5)
  239. dmgw= Weld(dmg,dmgb2,.125,-.125,-1.5,0,0,0,wep)
  240. --belt
  241. bbas= Part(2.1,.1,1.1,'Really black',0,false,false,wep)
  242. bbasw= Weld(bbas,pl.Torso,0,-.8,0,0,0,0,wep)
  243. b=Part(.4,.5,.2,'Pastel brown',0,false,false,wep)
  244. bw= Weld(b,bbas,.5,0,-.5,0,0,0,wep)
  245. b=Part(.4,.5,.2,'Pastel brown',0,false,false,wep)
  246. bw= Weld(b,bbas,0,0,-.5,0,0,0,wep)
  247. b=Part(.4,.5,.2,'Pastel brown',0,false,false,wep)
  248. bw= Weld(b,bbas,-.5,0,-.5,0,0,0,wep)
  249. b=Part(.1,.1,.1,'Black',0,false,false,wep)
  250. bm= Mesh(b,'http://www.roblox.com/Asset/?id=10207677',.2,.05,.2)
  251. bw= Weld(b,bbas,-.5,0,.5,math.pi/3,0,math.pi/3,wep)
  252. b=Part(.1,.1,.1,'Black',0,false,false,wep)
  253. bm= Mesh(b,'http://www.roblox.com/Asset/?id=10207677',.2,.05,.2)
  254. bw= Weld(b,bbas,0,0,.5,math.pi/3,0,-math.pi/3,wep)
  255. b=Part(.3,.1,.5,'',0,false,false,wep)
  256. bw= Weld(b,bbas,-.25,0,1,math.pi/5,0,0,wep)
  257. b=Part(.2,.3,.5,'Dark stone grey',0,false,false,wep)
  258. bw= Weld(b,bbas,-.25,0,1,math.pi/5,0,0,wep)
  259. --Right sword
  260. sb= Part(.21,.2,1.01,'Really black',0,false,false,wep)
  261. sbw= Weld(sb,pl['Right Arm'],0,-1,0,0,0,0,wep)
  262. s= Part(.2,.2,1.3,'',0,false,false,wep)
  263. sw= Weld(s,sb,0,-.1,-.15,0,0,0,wep)
  264. s= wPart(.1,.1,.1,'',0,false,false,wep)
  265. sw= Weld(s,sb,0,-.01,-.55,-math.pi/3.5+4.9,0,0,wep)
  266. s= Part(.1,.1,.1,'',0,false,false,wep)
  267. sw= Weld(s,sb,0,-.2,-.7,0,0,0,wep)
  268. s= Part(.1,.1,.1,'',0,false,false,wep)
  269. me=Mesh(s,3,1,.25,5)
  270. sw= Weld(s,sb,0,-.4,-.25,math.pi/8,0,0,wep)
  271. s= Part(.1,.1,.1,'',0,false,false,wep)
  272. me=Mesh(s,3,.5,1,.5)
  273. sw= Weld(s,sb,0,-.3,-.15,0,0,0,wep)
  274. s= Part(.1,.1,.1,'',0,false,false,wep)
  275. me=Mesh(s,3,.5,1,.5)
  276. sw= Weld(s,sb,0,-.3,0,0,0,0,wep)
  277. s= Part(.1,.1,.1,'',0,false,false,wep)
  278. me=Mesh(s,3,.5,1,.5)
  279. sw= Weld(s,sb,0,-.3,.15,0,0,0,wep)
  280. s= Part(.1,.1,.1,'',0,false,false,wep)
  281. me=Mesh(s,3,.5,.5,2)
  282. sw= Weld(s,sb,0,-.35,0,0,0,0,wep)
  283. s= Part(.1,.1,.1,'Really black',0,false,false,wep)
  284. me=Mesh(s,3,.5,1.1,.75)
  285. sw= Weld(s,sb,0,-.15,-.75,0,0,0,wep)
  286. s1= Part(.1,.1,.1,'',0,false,false,wep)
  287. me=Mesh(s1,3,.25,.7,20)
  288. sw= Weld(s1,sb,0,-.15,-2.5,0,0,0,wep)
  289. s= Part(.1,.1,.1,'',0,false,false,wep)
  290. me=Mesh(s,5,.25,.75,.75)
  291. sw= Weld(s,sb,0,-.15,-4.57,0,0,0,wep)
  292. s= Part(.1,.1,.1,'Really black',0,false,false,wep)
  293. me=Mesh(s,3,.26,1,.26)
  294. sw= Weld(s,sb,0,-.15,-2.5,math.pi/4,0,0,wep)
  295. s= Part(.1,.1,.1,'Really black',0,false,false,wep)
  296. me=Mesh(s,3,.26,1,.26)
  297. sw= Weld(s,sb,0,-.15,-3,math.pi/4,0,0,wep)
  298. s= Part(.1,.1,.1,'Really black',0,false,false,wep)
  299. me=Mesh(s,3,.26,1,.26)
  300. sw= Weld(s,sb,0,-.15,-3.5,math.pi/4,0,0,wep)
  301. s= Part(.1,.1,.1,'Really black',0,false,false,wep)
  302. me=Mesh(s,3,.26,1,.26)
  303. sw= Weld(s,sb,0,-.15,-4,math.pi/4,0,0,wep)
  304. s= Part(.1,.1,.1,'Really black',0,false,false,wep)
  305. me=Mesh(s,3,.26,1,.26)
  306. sw= Weld(s,sb,0,-.15,-2,math.pi/4,0,0,wep)
  307. s= Part(.1,.1,.1,'Really black',0,false,false,wep)
  308. me=Mesh(s,3,.26,1,.26)
  309. sw= Weld(s,sb,0,-.15,-1.5,math.pi/4,0,0,wep)
  310. s= Part(.1,.1,.1,'Really black',0,false,false,wep)
  311. me=Mesh(s,3,.26,1,.26)
  312. sw= Weld(s,sb,0,-.15,-1,math.pi/4,0,0,wep)
  313.  
  314. --left sword
  315. sb= Part(.21,.2,1.01,'Really black',0,false,false,wep)
  316. sbw= Weld(sb,pl['Left Arm'],0,-1,0,0,0,0,wep)
  317. s= Part(.2,.2,1.3,'',0,false,false,wep)
  318. sw= Weld(s,sb,0,-.1,-.15,0,0,0,wep)
  319. s= wPart(.1,.1,.1,'',0,false,false,wep)
  320. sw= Weld(s,sb,0,-.01,-.55,-math.pi/3.5+4.9,0,0,wep)
  321. s= Part(.1,.1,.1,'',0,false,false,wep)
  322. sw= Weld(s,sb,0,-.2,-.7,0,0,0,wep)
  323. s= Part(.1,.1,.1,'',0,false,false,wep)
  324. me=Mesh(s,3,1,.25,5)
  325. sw= Weld(s,sb,0,-.4,-.25,math.pi/8,0,0,wep)
  326. s= Part(.1,.1,.1,'',0,false,false,wep)
  327. me=Mesh(s,3,.5,1,.5)
  328. sw= Weld(s,sb,0,-.3,-.15,0,0,0,wep)
  329. s= Part(.1,.1,.1,'',0,false,false,wep)
  330. me=Mesh(s,3,.5,1,.5)
  331. sw= Weld(s,sb,0,-.3,0,0,0,0,wep)
  332. s= Part(.1,.1,.1,'',0,false,false,wep)
  333. me=Mesh(s,3,.5,1,.5)
  334. sw= Weld(s,sb,0,-.3,.15,0,0,0,wep)
  335. s= Part(.1,.1,.1,'',0,false,false,wep)
  336. me=Mesh(s,3,.5,.5,2)
  337. sw= Weld(s,sb,0,-.35,0,0,0,0,wep)
  338. s= Part(.1,.1,.1,'Really black',0,false,false,wep)
  339. me=Mesh(s,3,.5,1.1,.75)
  340. sw= Weld(s,sb,0,-.15,-.75,0,0,0,wep)
  341. s2= Part(.1,.1,.1,'',0,false,false,wep)
  342. me=Mesh(s2,3,.25,.7,20)
  343. sw= Weld(s2,sb,0,-.15,-2.5,0,0,0,wep)
  344. s= Part(.1,.1,.1,'',0,false,false,wep)
  345. me=Mesh(s,5,.25,.75,.75)
  346. sw= Weld(s,sb,0,-.15,-4.57,0,0,0,wep)
  347. s= Part(.1,.1,.1,'Really black',0,false,false,wep)
  348. me=Mesh(s,3,.26,1,.26)
  349. sw= Weld(s,sb,0,-.15,-2.5,math.pi/4,0,0,wep)
  350. s= Part(.1,.1,.1,'Really black',0,false,false,wep)
  351. me=Mesh(s,3,.26,1,.26)
  352. sw= Weld(s,sb,0,-.15,-3,math.pi/4,0,0,wep)
  353. s= Part(.1,.1,.1,'Really black',0,false,false,wep)
  354. me=Mesh(s,3,.26,1,.26)
  355. sw= Weld(s,sb,0,-.15,-3.5,math.pi/4,0,0,wep)
  356. s= Part(.1,.1,.1,'Really black',0,false,false,wep)
  357. me=Mesh(s,3,.26,1,.26)
  358. sw= Weld(s,sb,0,-.15,-4,math.pi/4,0,0,wep)
  359. s= Part(.1,.1,.1,'Really black',0,false,false,wep)
  360. me=Mesh(s,3,.26,1,.26)
  361. sw= Weld(s,sb,0,-.15,-2,math.pi/4,0,0,wep)
  362. s= Part(.1,.1,.1,'Really black',0,false,false,wep)
  363. me=Mesh(s,3,.26,1,.26)
  364. sw= Weld(s,sb,0,-.15,-1.5,math.pi/4,0,0,wep)
  365. s= Part(.1,.1,.1,'Really black',0,false,false,wep)
  366. me=Mesh(s,3,.26,1,.26)
  367. sw= Weld(s,sb,0,-.15,-1,math.pi/4,0,0,wep)
  368. mouse.KeyDown:connect(function(key)
  369. if key == "q" and not q and mouse.Target then
  370. if (mouse.Hit.p - pl.Torso.Position).magnitude < 200 then
  371. pfvalue.Value = true
  372. a = mouse.Hit.p
  373. q = Instance.new("SelectionPointLasso",pl)
  374. q.Color = BrickColor.new("Really black")
  375. q.Point = mouse.Hit.p
  376. q.Humanoid = pl.Humanoid
  377. if pl.Torso:FindFirstChild("Smoke") then
  378. game:GetService("Debris"):AddItem(pl.Torso.Smoke,0)end
  379. if not weightless then
  380. weightless = Instance.new("BodyPosition",pl.Head)
  381. weightless.maxForce = Vector3.new(0,10000,0)
  382. weightless.position = Vector3.new(0,1000,0)
  383. coroutine.resume(coroutine.create(function()
  384. local current = weightless wait(0.25)
  385. if current == weightless then
  386. weightless.maxForce = Vector3.new(0,5000,0)end
  387. end))end end
  388. elseif key == "e" and not e and mouse.Target then
  389. if (mouse.Hit.p - pl.Torso.Position).magnitude < 200 then
  390. pfvalue.Value = true
  391. b = mouse.Hit.p
  392. e = Instance.new("SelectionPointLasso",pl)
  393. e.Color = BrickColor.new("Really black")
  394. e.Point = mouse.Hit.p
  395. e.Humanoid = pl.Humanoid
  396. if pl.Torso:FindFirstChild("Smoke") then
  397. game:GetService("Debris"):AddItem(pl.Torso.Smoke,0)end
  398. if not weightless then
  399. weightless = Instance.new("BodyPosition",pl.Head)
  400. weightless.maxForce = Vector3.new(0,10000,0)
  401. weightless.position = Vector3.new(0,1000,0)
  402. coroutine.resume(coroutine.create(function()
  403. local current = weightless wait(0.25)
  404. if current == weightless then
  405. weightless.maxForce = Vector3.new(0,5000,0)end
  406. end))end end
  407. elseif key == "f" and (q or e) then
  408. if q then
  409. game:GetService("Debris"):AddItem(q,0)end
  410. if e then
  411. game:GetService("Debris"):AddItem(e,0)end
  412. q,e = nil, nil
  413. bgdest = pl.Torso.Position + (pl.Torso.CFrame.lookVector * 125)
  414. gas = Instance.new("Smoke",pl.Torso)
  415. gas.Size = 0.1
  416. gas.Opacity = 0.25
  417. if not weightless then
  418. weightless = Instance.new("BodyPosition",pl.Head)
  419. weightless.maxForce = Vector3.new(0,10000,0)
  420. weightless.position = Vector3.new(0,1000,0)
  421. coroutine.resume(coroutine.create(function()
  422. local current = weightless wait(0.25)
  423. if current == weightless then
  424. weightless.maxForce = Vector3.new(0,5000,0)end
  425. end))end end end)
  426. mouse.KeyUp:connect(function(key)
  427. if key == "q" and q then
  428. if not e then
  429. pfvalue.Value = false end
  430. game:GetService("Debris"):AddItem(q,0)
  431. q = nil a = nil if weightless then
  432. game:GetService("Debris"):AddItem(weightless,0)
  433. weightless = nil end
  434. elseif key == "e" and e then
  435. if not q then
  436. pfvalue.Value = false end
  437. game:GetService("Debris"):AddItem(e,0)
  438. e = nil b = nil if weightless then
  439. game:GetService("Debris"):AddItem(weightless,0)
  440. weightless = nil end end end)
  441. pfvalue.Changed:connect(function()
  442. if pfvalue.Value == false then
  443. pl.Humanoid.PlatformStand = false
  444. pl["Left Leg"].CanCollide = false
  445. pl["Right Leg"].CanCollide = false
  446. pl["Left Arm"].CanCollide = false
  447. pl["Right Arm"].CanCollide = false
  448. else
  449. pl.Humanoid.PlatformStand = true
  450. pl["Left Leg"].CanCollide = true
  451. pl["Right Leg"].CanCollide = true
  452. pl["Left Arm"].CanCollide = false
  453. pl["Right Arm"].CanCollide = false
  454. end end)function grapple()wait()
  455. local pos = pl.Torso.Position
  456. if q and e then
  457. local tab = {a.x,a.y,a.z,b.x,b.y,b.z}
  458. local x = {}numqe = numqe + 1 local num = numqe
  459. for i = 1,3 do table.insert(x,(tab[i] + tab[i+3])/2)end
  460. bp.position = Vector3.new(unpack(x))bp.D = 10
  461. bp.maxForce = Vector3.new(4500 * (math.abs(pos.x-bgdest.x)/200) + 3000,4500 * (math.abs(pos.y-bgdest.y)/200) + 3000,4500 * (math.abs(pos.z-bgdest.z)/200) + 3000)
  462. wait(1)if num == numqe then
  463. bp.D = 0 end elseif q then
  464. numq = numq + 1 local num = numq
  465. bp.position = a bp.D = 10
  466. bp.maxForce = Vector3.new(4000 * (math.abs(pos.x-bgdest.x)/200) + 3000,4500 * (math.abs(pos.y-bgdest.y)/200) + 3000,4500 * (math.abs(pos.z-bgdest.z)/200) + 3000)
  467. bgdest = a bg.maxTorque = Vector3.new(5000,5000,5000)wait(1)
  468. if num == numq then bp.D = 0 end
  469. elseif e then nume = nume + 1 local num = nume
  470. bp.position = b bp.D = 10
  471. bp.maxForce = Vector3.new(4000 * (math.abs(pos.x-bgdest.x)/200) + 3000,4500 * (math.abs(pos.y-bgdest.y)/200) + 3000,4500 * (math.abs(pos.z-bgdest.z)/200) + 3000)
  472. bgdest = b bg.maxTorque = Vector3.new(5000,5000,5000) wait(1)
  473. if num == nume then bp.D = 0 end
  474. elseif pl.Torso:FindFirstChild("Smoke") then
  475. nums = nums + 1 num = nums bp.position = bgdest bp.D = 10
  476. bp.maxForce = Vector3.new(4000 * (math.abs(pos.x-bgdest.x)/200) + 2000,4500 * (math.abs(pos.y-bgdest.y)/200) + 2000,4500 * (math.abs(pos.z-bgdest.z)/200) + 2000)
  477. bg.maxTorque = Vector3.new(6000,6000,6000)
  478. wait(1) if num == nums then bp.D = 0 end else
  479. bp.maxForce = Vector3.new(0,0,0)
  480. bg.maxTorque = Vector3.new(0,0,0)end end
  481. mouse.KeyDown:connect(grapple)
  482. mouse.KeyUp:connect(grapple)
  483. coroutine.wrap(function() while wait() do
  484. bg.cframe = CFrame.new(pl.Torso.Position,bgdest)
  485. end end)()
  486. if anim then
  487. anim:Destroy()
  488. end
  489.  
  490. local rm = Instance.new("Motor", torso)
  491. rm.C0 = CFrame.new(1.5, 0.5, 0)
  492. rm.C1 = CFrame.new(0, 0.5, 0)
  493. rm.Part0 = torso
  494. rm.Part1 = ra
  495. local lm = Instance.new("Motor", torso)
  496. lm.C0 = CFrame.new(-1.5, 0.5, 0)
  497. lm.C1 = CFrame.new(0, 0.5, 0)
  498. lm.Part0 = torso
  499. lm.Part1 = la
  500.  
  501. local rlegm = Instance.new("Motor", torso)
  502. rlegm.C0 = CFrame.new(0.5, -1, 0)
  503. rlegm.C1 = CFrame.new(0, 1, 0)
  504. rlegm.Part0 = torso
  505. rlegm.Part1 = rl
  506. local llegm = Instance.new("Motor", torso)
  507. llegm.C0 = CFrame.new(-0.5, -1, 0)
  508. llegm.C1 = CFrame.new(0, 1, 0)
  509. llegm.Part0 = torso
  510. llegm.Part1 = ll
  511.  
  512. rsc0 = rm.C0
  513. lsc0 = lm.C0
  514. llc0 = llegm.C0
  515. rlc0 = rlegm.C0
  516. neckc0 = neck.C0
  517. rootc0 = rj.C0
  518.  
  519. local count = 0
  520. local countspeed = 1
  521. coroutine.wrap(function()
  522. while wait() do
  523. if anim==true then break end
  524. count = (count % 100) + countspeed
  525. angle = math.pi * math.sin(math.pi*2/100*count)
  526. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 2 then
  527. countspeed = 1
  528. --Idle anim
  529. rlegm.C0 = rlc0 * CFrame.Angles(angle*.025, 0, 0)
  530. llegm.C0 = llc0 * CFrame.Angles(-angle*.025, 0, 0)
  531. rm.C0 = rsc0 * CFrame.Angles(0, angle*.05, angle*.05)
  532. lm.C0 = lsc0 * CFrame.Angles(0, -angle*.05, -angle*.05)
  533. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude > 2 then
  534. countspeed = 7
  535. --Walk anim
  536. rlegm.C0 = rlc0 * CFrame.Angles(angle*0.25, 0, angle*0.015)
  537. llegm.C0 = llc0 * CFrame.Angles(-angle*0.25, 0, angle*0.015)
  538. rm.C0 = rsc0 * CFrame.Angles(-angle*0.25, angle*.05, angle*0.080)
  539. lm.C0 = lsc0 * CFrame.Angles(angle*0.25, -angle*.05, angle*0.080)
  540. end end end)()
  541. end)
Add Comment
Please, Sign In to add comment