rouyen

Untitled

Aug 26th, 2016
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.61 KB | None | 0 0
  1. ply = game.Players.LocalPlayer
  2. char = ply.Character
  3.  
  4. ------TOOOOOLS------
  5. T = {["P"] = function(x,y,z,color,transparency,cancollide,anchored,parent)
  6. c = Instance.new("Part",m)
  7. c.TopSurface,c.BottomSurface = 0,0
  8. c.formFactor = "Custom"
  9. c.Size = Vector3.new(x,y,z)
  10. c.BrickColor = BrickColor.new(color)
  11. c.Transparency = transparency
  12. c.CanCollide = cancollide
  13. if anchored ~= nil then c.Anchored = anchored end
  14. if parent ~= nil then c.Parent = parent end
  15. return c
  16.  
  17. end
  18. ,
  19. ["R"] = function(part,x,y,z)
  20. if part == "lleg" then
  21. legw[1].C1 = CFrame.new(.5,-1.5,0)*ang(x,y,z)
  22. elseif part == "rleg" then
  23. legw[2].C1 = CFrame.new(-.5,-1.5,0)*ang(x,y,z)
  24. elseif part == "larm" then
  25. armw[1].C1 = CFrame.new(1.5,.5,0)*ang(x,y,z)
  26. elseif part == "rarm" then
  27. armw[2].C1 = CFrame.new(-1.5,.5,0)*ang(x,y,z)
  28. end
  29. end
  30. ,
  31. ["C"] = function(func) coroutine.resume(coroutine.create(func)) end
  32. ,
  33. ["W"] = function(part0,part1,x,y,z,rx,ry,rz)
  34. w = Instance.new("Weld",m)
  35. w.Part0,w.Part1 = part0,part1
  36. w.C1 = CFrame.new(x,y,z) * CFrame.Angles(rx,ry,rz)
  37. return w
  38. end
  39. ,
  40. ["BG"] = function(parent)
  41. local c = Instance.new("BodyGyro",parent)
  42. c.P = 20e+003
  43. c.cframe = parent.CFrame
  44. c.maxTorque = Vector3.new(c.P,c.P,c.P)
  45. return c
  46. end
  47. ,
  48. ["BP"] = function(parent,position)
  49. local bp = Instance.new("BodyPosition",parent)
  50. bp.maxForce = Vector3.new()*math.huge
  51. bp.position = position
  52. return bp
  53. end
  54. ,
  55. ["F"] = function(parent,size,heat,color,secondcolor,enabled)
  56. f = Instance.new("Fire",parent)
  57. f.Size = size
  58. f.Heat = heat
  59. if enabled ~= nil then f.Enabled = enabled end
  60. if color ~= nil then f.Color = BrickColor.new(color).Color end
  61. if secondcolor ~= nil then f.SecondaryColor = BrickColor.new(secondcolor).Color end
  62. return f
  63. end
  64. ,
  65. ["Track"] = function(obj,s,t,lt)
  66. coroutine.resume(coroutine.create(function()
  67. while track do
  68. old = obj.Position
  69. wait()
  70. new = obj.Position
  71.  
  72. mag = (old-new).magnitude
  73. dist = (old+new)/2
  74.  
  75. ray = T.P(s,mag+.2,s,obj.Color,t,false,true)
  76. Instance.new("CylinderMesh",ray)
  77. ray.CFrame = CFrame.new(dist,old)*ang(math.pi/2,0,0)
  78. game:GetService("Debris"):AddItem(ray,lt)
  79.  
  80. end
  81. end)) end,
  82. ["D"] = function(hit) if hit.Parent:findFirstChild("Humanoid") then h=hit.Parent.Humanoid h.Health = h.Health -dmg end end
  83. ,
  84. ["FM"] = function(parent,meshid,x,y,z,meshtexture)
  85. if meshid == "cylinder" then
  86. mesh = Instance.new("CylinderMesh",parent)
  87. mesh.Scale = Vector3.new(x,y,z)
  88. return mesh
  89. else
  90. mesh = Instance.new("SpecialMesh",parent)
  91.  
  92. if meshid ~= "sphere" then
  93. if type(meshid) == "number" then mesh.MeshId = "rbxassetid://"..meshid else
  94. mesh.MeshId = "rbxassetid://"..meshids[meshid]
  95. end
  96.  
  97. else mesh.MeshType = 3 end
  98.  
  99. mesh.Scale = Vector3.new(x,y,z)
  100.  
  101. if meshtexture ~= nil then
  102. if type(meshtexture) == "number" then mesh.TextureId = "rbxassetid://"..meshtexture else
  103. mesh.TextureId = "rbxassetid://"..textureids[meshtexture] end
  104.  
  105. end
  106.  
  107. return mesh
  108. end
  109. end
  110. }
  111. --------------------------------------------------
  112.  
  113. meshids = {["blast"] = 20329976, ["penguin"] = 15853464, ["ring"] = 3270017,
  114. ["spike"] = 1033714,["cone"] = 1082802,["crown"] = 20329976,["crossbow"] = 15886761,
  115. ["cloud"] = 1095708,["mjolnir"] = 1279013,["diamond"] = 9756362, ["hand"] = 37241605,
  116. ["fist"] = 65322375,["skull"] = 36869983,["totem"] = 35624068,["spikeb"] = 9982590,["dragon"] = 58430372,
  117. ["fish"] = 31221717, ["coffee"] = 15929962}---some meshids
  118. textureids = {["cone"] = 1082804,["rainbow"] = 28488599,["fish"] = 31221733, ["coffee"] = 24181455,
  119. ["monster"] = 33366441}
  120.  
  121. cfn,ang = CFrame.new,CFrame.Angles
  122. v3n = Vector3.new
  123.  
  124. ---MATH SHORTENINGS---
  125. M = {["R"] = function(a,b) return math.random(a,b) end,
  126. ["Cos"] = function(a) return math.cos(a) end,
  127. ["Sin"] = function(a) return math.sin(a) end,
  128. ["D"] = function(a) return math.rad(a) end
  129. }
  130.  
  131. pcall(function() char:FindFirstChild("DFFG"):Remove() end)
  132. m = Instance.new("Model",char)
  133. m.Name = "DFFG"
  134. torso = char.Torso
  135. local body = {}
  136. body.A = {["L"] = char["Left Arm"],["R"] = char["Right Arm"]}
  137. body.L = {["L"] = char["Left Leg"],["R"] = char["Right Leg"]}
  138. body.S = {["L"] = torso["Left Shoulder"],["R"] = torso["Right Shoulder"]}
  139. body.H = {["L"] = torso["Left Hip"],["R"] = torso["Right Hip"]}
  140. body.Head = char.Head
  141.  
  142. pp = T.P(.5,1,.5,"Grime",0,false,false)
  143. T.W(pp,torso,0,.5,1,math.pi/2,0,0)
  144.  
  145. p = T.P(.5,2,.5,"Grime",0,false,false)
  146. T.FM(p,"cylinder",1,1,1)
  147. T.W(p,pp,0,.5,0,math.pi/2,0,0)
  148. b1 = T.P(.5,.5,.5,"Alder",0,false,false)
  149. T.FM(b1,"sphere",1,1,1)
  150. T.W(b1,p,0,1,0,0,0,0)
  151.  
  152. b2 = T.P(.5,.5,.5,"Alder",0,false,false)
  153. T.FM(b2,"sphere",1,1,1)
  154. T.W(b2,p,0,-1,0,0,0,0)
  155. fire = T.F(b1,5,10,"New Yeller","White",false)
  156. --------WINGS-------
  157. p2 = T.P(.2,2,.2,"Dusty Rose",0,false,false)
  158. T.W(p2,b1,-1,.1,0,0,0,math.pi/2,0)
  159.  
  160. b2 = T.P(.5,.5,.5,"New Yeller",0,false,false)
  161. T.FM(b2,"sphere",1,1,1)
  162. T.W(b2,p2,0,1,0,0,0,-math.pi/2)
  163. fire1 = T.F(b2,1,20,"Alder","White",false)
  164.  
  165. p3 = T.P(.2,2,.2,"Dusty Rose",0,false,false)
  166. T.W(p3,p2,-1.2,1,0,0,0,math.pi/2,0)
  167.  
  168.  
  169. p4 = T.P(.2,2,.2,"Dusty Rose",0,false,false)
  170. T.W(p4,p3,-1,1,0,0,0,math.pi/2,0)
  171.  
  172. b2 = T.P(.5,.5,.5,"Alder",0,false,false)
  173. T.FM(b2,"sphere",1,1,1)
  174. T.W(b2,p4,0,-1,0,0,0,0)
  175.  
  176.  
  177. p2 = T.P(.2,2,.2,"Dusty Rose",0,false,false)
  178. T.W(p2,b1,1,.1,0,0,0,math.pi/2,0)
  179.  
  180. b2 = T.P(.5,.5,.5,"New Yeller",0,false,false)
  181. T.FM(b2,"sphere",1,1,1)
  182. T.W(b2,p2,0,-1,0,0,0,-math.pi/2)
  183. fire2 = T.F(b2,1,20,"Alder","White",false)
  184.  
  185. p3 = T.P(.2,2,.2,"Dusty Rose",0,false,false)
  186. T.W(p3,p2,-1.2,-1,0,0,0,math.pi/2,0)
  187.  
  188. p4 = T.P(.2,2,.2,"Dusty Rose",0,false,false)
  189. T.W(p4,p3,1,1,0,0,0,math.pi/2,0)
  190.  
  191. b2 = T.P(.5,.5,.5,"Alder",0,false,false)
  192. T.FM(b2,"sphere",1,1,1)
  193. T.W(b2,p4,0,1,0,0,0,0)
  194. ----------------------------
  195.  
  196. hop = Instance.new("HopperBin",ply.Backpack)
  197. hop.Name = "Fly"
  198. bp = nil
  199. bg = nil
  200. sparkling = false
  201. T.C(function()
  202. while true do
  203. wait()
  204. if sparkling then
  205. local c = T.P(1,1,1,"White",1,true,false)
  206. c.CFrame = cfn(b1.Position) c:BreakJoints()
  207. c.Velocity = v3n(M.R(0,100),M.R(0,100),M.R(0,100))
  208. Instance.new("Sparkles",c)
  209. box = Instance.new("SelectionBox",c)
  210. box.Adornee = c
  211. box.Color = BrickColor.new("White")
  212. game:GetService("Debris"):AddItem(c,.5)
  213. end
  214. end
  215. end)
  216.  
  217. function sidefires(a)
  218. if a == 1 then
  219. fire1.Enabled,fire2.Enabled = true,true
  220. elseif a == 0 then
  221. fire1.Enabled,fire2.Enabled = false,false
  222. end
  223. end
  224. jails = {}
  225. function jail(a)
  226.  
  227. r = 3
  228. local tor = a.Parent:FindFirstChild("Torso")
  229.  
  230. if tor ~= nil then
  231. local bp =T.BP(tor,tor.Position)
  232. local cf = a.Parent.Torso.CFrame
  233. local modl = Instance.new("Model",m)
  234. for i = 1,360,20 do
  235. wait()
  236. c = T.P(2,6,2,"Black",.5,true,true,modl)
  237. T.FM(c,"cylinder",1,1,1)
  238. c.CFrame = cf + v3n(M.Cos(M.D(i))*r,0,M.Sin(M.D(i))*r)
  239. end
  240. for i = 1,180,10 do
  241. wait()
  242. p = T.P(1,1,9,"Nougat",.5,true,true,modl)
  243. p.CFrame = (cf * cfn(0,3,0))*ang(0,M.D(i),0)
  244. end
  245. table.insert(jails,modl)
  246. game:GetService("Debris"):AddItem(modl,math.huge)
  247. bp:Remove()
  248. end
  249. end
  250.  
  251. function unjail()
  252. for i,v in pairs(jails) do v:Remove() table.Remove(jails,i) end
  253. end
  254.  
  255. function trip(a)
  256. local tor = a.Parent:FindFirstChild("Torso")
  257. if tor ~= nil then
  258. local bg2 = T.BG(tor)
  259. bg2.cframe = bg2.cframe * ang(math.pi,0,0)
  260. local bp2 = T.BP(tor,tor.Position + Vector3.new(0,5,0))
  261. for i = 1,2 do
  262. for i = -10,10 do
  263. wait()
  264. bg2.cframe = bg2.cframe * ang(0,0,M.D(i))
  265. p = T.P(1,.3,1,"New Yeller",true,false)
  266. T.FM(p,"cylinder",1,1,1)
  267. p.CFrame = tor.CFrame * cfn(0,2,0)
  268. game:GetService("Debris"):AddItem(p,1)
  269. end
  270. for i = 10,-10,-1 do
  271. wait()
  272. bg2.cframe = bg2.cframe * ang(0,0,M.D(i))
  273. p = T.P(1,.3,1,"New Yeller",true,false)
  274. T.FM(p,"cylinder",1,1,1)
  275. p.CFrame = tor.CFrame * cfn(0,2,0)
  276. game:GetService("Debris"):AddItem(p,1)
  277. end
  278. end
  279.  
  280. bp2:Remove() bg2:Remove()
  281.  
  282. end
  283. end
  284.  
  285. hop.Selected:connect(function(mouse)
  286. mouse.Button1Up:connect(function() holding = false end)
  287. mouse.KeyDown:connect(function(key)
  288. if key == "f" then
  289. if bp == nil then
  290. sidefires(1)
  291. bp = T.BP(torso,torso.Position)
  292. bg = T.BG(torso)
  293. bg.Parent = nil
  294. elseif bp ~= nil then
  295. sidefires(0)
  296. bp:Remove() bp = nil
  297. bg:Remove() bg = nil
  298. end
  299. elseif key == "g" then jail(mouse.Target)
  300. elseif key == "r" then trip(mouse.Target)
  301. elseif key == "t" then unjail()
  302. end
  303. end)
  304.  
  305. mouse.Button1Down:connect(function()
  306. if bp ~= nil then
  307. holding = true
  308. bg.Parent = torso
  309. char.Animate.Disabled = true
  310. for i,v in pairs(body.S) do v.DesiredAngle = 0 end
  311. for i,v in pairs(body.H) do v.DesiredAngle = 0 end
  312. body.S.R.DesiredAngle = math.pi
  313. sidefires(0)
  314. fire.Enabled = true
  315. sparkling = true
  316. while holding == true do
  317. wait()
  318. unit = (torso.Position-mouse.hit.p).unit
  319. bp.position = torso.Position + unit*-30
  320. bg.cframe = cfn(torso.Position,mouse.hit.p)*ang(-math.pi/2,0,0)
  321. end
  322. sparkling = false
  323. sidefires(1)
  324. bg.Parent = nil
  325. fire.Enabled = false
  326. char.Animate.Disabled = false
  327. end
  328. end)
  329. end)
Add Comment
Please, Sign In to add comment