Prysq

Untitled

Oct 22nd, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.59 KB | None | 0 0
  1. local/
  2. ply = game.Players.LocalPlayer
  3. char = ply.Character
  4. torso = char.Torso
  5. shoulder = nil
  6.  
  7. body = {}
  8. body.A = {["L"] = char["Left Arm"],["R"] = char["Right Arm"]}
  9. body.L = {["L"] = char["Left Leg"],["R"] = char["Right Leg"]}
  10. body.S = {["L"] = torso["Left Shoulder"],["R"] = torso["Right Shoulder"]}
  11. body.H = {["H"] = torso["Left Shoulder"],["H"] = torso["Right Shoulder"]}
  12. local normposR = body.S.R.C0
  13. local normposL = body.S.L.C0
  14. body.Head = char.Head
  15. rw,lw = Instance.new("Weld"),Instance.new("Weld")
  16. rhw,lhw = Instance.new("Weld"),Instance.new("Weld")
  17.  
  18. list = {
  19. ["RS"] = rw,
  20. ["LS"]=lw,
  21. ["RH"]=rhw,
  22. ["LH"]=lhw
  23. }
  24.  
  25. function lock(arm,a)
  26. if a == 1 then
  27. b,c = arm:sub(1,1),arm:sub(2,2)
  28.  
  29. shoulder = body[c][b]
  30.  
  31. we = list[arm]
  32.  
  33. we.Parent = torso
  34. we.C0,we.C1 = shoulder.C0 ,shoulder.C1
  35. we.Part0,we.Part1 = shoulder.Part0 ,shoulder.Part1
  36. shoulder.Parent = nil
  37.  
  38. elseif a == 0 then
  39. we.Parent = nil
  40. shoulder.Parent = torso
  41. end
  42. end
  43.  
  44. m = Instance.new("Model",char)
  45.  
  46. meshids = {["blast"] = 20329976, ["penguin"] = 15853464, ["ring"] = 3270017,
  47. ["spike"] = 1033714,["cone"] = 1082802,["crown"] = 20329976,["crossbow"] = 15886761,
  48. ["cloud"] = 1095708,["mjolnir"] = 1279013,["diamond"] = 9756362, ["hand"] = 37241605,
  49. ["fist"] = 65322375,["skull"] = 36869983,["totem"] = 35624068,["spikeb"] = 9982590,["dragon"] = 58430372,
  50. ["fish"] = 31221717, ["coffee"] = 15929962}---some meshids
  51. textureids = {["cone"] = 1082804,["rainbow"] = 28488599,["fish"] = 31221733, ["coffee"] = 24181455,
  52. ["monster"] = 33366441}
  53.  
  54. ------TOOOOOLS------
  55. T = {["P"] = function(x,y,z,color,transparency,cancollide,anchored,parent)
  56. c = Instance.new("Part",m)
  57. c.TopSurface,c.BottomSurface = 0,0
  58. c.formFactor = "Custom"
  59. c.Size = Vector3.new(x,y,z)
  60. c.BrickColor = BrickColor.new(color)
  61. c.Transparency = transparency
  62. c.CanCollide = cancollide
  63. if anchored ~= nil then c.Anchored = anchored end
  64. if parent ~= nil then c.Parent = parent end
  65. return c
  66.  
  67. end
  68. ,
  69. ["C"] = function(func) coroutine.resume(coroutine.create(func)) end
  70. ,
  71. ["W"] = function(part0,part1,x,y,z,rx,ry,rz)
  72. w = Instance.new("Weld",m)
  73. w.Part0,w.Part1 = part0,part1
  74. w.C1 = CFrame.new(x,y,z) * CFrame.Angles(rx,ry,rz)
  75. return w
  76. end
  77. ,
  78. ["BG"] = function(parent)
  79. local c = Instance.new("BodyGyro",parent)
  80. c.P = 20e+003
  81. c.cframe = parent.CFrame
  82. c.maxTorque = Vector3.new(c.P,c.P,c.P)
  83. return c
  84. end
  85. ,
  86. ["BP"] = function(parent,position)
  87. local bp = Instance.new("BodyPosition",parent)
  88. bp.maxForce = Vector3.new()*math.huge
  89. bp.position = position
  90. return bp
  91. end
  92. ,
  93. ["F"] = function(parent,size,heat,color,secondcolor)
  94. f = Instance.new("Fire",parent)
  95. f.Size = size
  96. f.Heat = heat
  97. if color ~= nil then f.Color = BrickColor.new(color).Color end
  98. if secondcolor ~= nil then f.SecondaryColor = BrickColor.new(secondcolor).Color end
  99. return f
  100. end
  101. ,
  102. ["Track"] = function(obj,s,t,lt)
  103. coroutine.resume(coroutine.create(function()
  104. while track do
  105. old = obj.Position
  106. wait()
  107. new = obj.Position
  108.  
  109. mag = (old-new).magnitude
  110. dist = (old+new)/2
  111.  
  112. ray = T.P(s,mag+.2,s,obj.Color,t,false,true)
  113. Instance.new("CylinderMesh",ray)
  114. ray.CFrame = CFrame.new(dist,old)*ang(math.pi/2,0,0)
  115. game:GetService("Debris"):AddItem(ray,lt)
  116.  
  117. end
  118. end)) end,
  119. ["D"] = function(hit) if hit.Parent:findFirstChild("Humanoid") then h=hit.Parent.Humanoid h.Health = h.Health -dmg end end
  120. ,
  121. ["FM"] = function(parent,meshid,x,y,z,meshtexture)
  122. if meshid == "cylinder" then
  123. mesh = Instance.new("CylinderMesh",parent)
  124. mesh.Scale = Vector3.new(x,y,z)
  125. return mesh
  126. else
  127. mesh = Instance.new("SpecialMesh",parent)
  128.  
  129. if meshid ~= "sphere" then
  130. if type(meshid) == "number" then mesh.MeshId = "rbxassetid://"..meshid else
  131. mesh.MeshId = "rbxassetid://"..meshids[meshid]
  132. end
  133.  
  134. else mesh.MeshType = 3 end
  135.  
  136. mesh.Scale = Vector3.new(x,y,z)
  137.  
  138. if meshtexture ~= nil then
  139. if type(meshtexture) == "number" then mesh.TextureId = "rbxassetid://"..meshtexture else
  140. mesh.TextureId = "rbxassetid://"..textureids[meshtexture] end
  141.  
  142. end
  143.  
  144. return mesh
  145. end
  146. end
  147. }
  148. --------------------------------------------------
  149. ---MATH SHORTENINGS---
  150. M = {["R"] = function(a,b) return math.random(a,b) end,
  151. ["Cos"] = function(a) return math.cos(a) end,
  152. ["Sin"] = function(a) return math.sin(a) end,
  153. ["D"] = function(a) return math.rad(a) end
  154. }
  155. ---------------------------
  156.  
  157. cfn,ang = CFrame.new,CFrame.Angles
  158. v3n = Vector3.new
  159.  
  160. m = Instance.new("Model",char)
  161.  
  162. function damage(hit,amount)
  163. for i,v in pairs(hit:GetChildren()) do
  164. if v:IsA("Humanoid") and v.Parent ~= char then
  165.  
  166. v.Health = v.Health - amount
  167.  
  168. amo = 0
  169. for i,o in pairs(v.Parent:GetChildren()) do
  170. if o:IsA("BillboardGui") and o.Name == "satuttava" then
  171. amo = amo+1
  172. end end
  173.  
  174. local bbg = Instance.new("BillboardGui",v.Parent)
  175. bbg.Adornee = v.Torso
  176. bbg.Name = "satuttava"
  177. bbg.Size = UDim2.new(2,0,2,0)
  178. bbg.StudsOffset = Vector3.new(0,6+amo*2,0)
  179.  
  180. box = Instance.new("TextLabel",bbg)
  181. box.Size = UDim2.new(1,0,1,0)
  182. box.BackgroundColor = BrickColor.new("White")
  183. box.Text = amount
  184. box.Position = UDim2.new(0,0,0,0)
  185. box.TextScaled = true
  186. game:GetService("Debris"):AddItem(bbg,.5)
  187. end
  188. end
  189. end
  190.  
  191.  
  192. hop = Instance.new("HopperBin",ply.Backpack)
  193.  
  194. holding = false
  195. function attack1(mouse)
  196. r = 20
  197. bp = T.BP(torso,torso.Position + v3n(0,20,0))
  198. bg = T.BG(torso)
  199. bg.cframe = mouse.hit
  200. while (bp.position-torso.Position).magnitude > 3 do wait() end
  201. holding=true
  202. while holding do
  203. for i = 1,360,60 do
  204. wait()
  205. local pos = torso.CFrame * cfn(M.Cos(M.D(i))*r,M.Sin(M.D(i))*r,-5)
  206.  
  207.  
  208. local dragon = T.P(10,10,10,"White",.5,false,true)
  209. T.FM(dragon,"dragon",dragon.Size.x,dragon.Size.y,dragon.Size.z)
  210.  
  211. dragon.CFrame = pos
  212. T.C(function()
  213. for i = 1,50,5 do
  214. wait()
  215. bg.cframe = mouse.hit
  216. dragon.CFrame = cfn(pos.p,mouse.hit.p) * cfn(0,0,-i)
  217. dragon.Transparency = i/50
  218. T.C(function()
  219. for i,v in pairs(Workspace:GetChildren()) do
  220. if v:IsA("Model") then
  221. local torso = v:FindFirstChild("Torso")
  222. if torso ~= nil then
  223. if (v.PrimaryPart.Position-dragon.Position).magnitude < 5 then damage(v,2) end
  224. end end
  225. end
  226. end)
  227.  
  228. end
  229. dragon:Remove()
  230. end)
  231. end
  232. end
  233. bg:Remove() bp:Remove()
  234. end
  235.  
  236. function spear(mouse)
  237. local portal = T.P(1,1,1,"Magenta",.5,false,true)
  238. local msh = T.FM(portal,"sphere",1,1,1)
  239. portal.CFrame = cfn(mouse.hit.p)
  240. local pos = cfn(portal.Position)
  241.  
  242. local p = T.P(1,1,1,"White",0,false,true)
  243. p.CFrame = pos
  244. T.FM(p,"crown",5,1,5)
  245.  
  246. T.C(function()
  247. while true do
  248. wait()
  249. p.CFrame = p.CFrame * ang(0,M.D(20),0)
  250. end
  251. end)
  252.  
  253. for i = 1,10 do
  254. wait()
  255. msh.Scale = v3n(i,1,i)
  256. end
  257.  
  258. local stick = T.P(.5,1,.5,"Nougat",0,true,true)
  259. stick.CFrame = pos
  260. T.FM(stick,"cylinder",1,1,1)
  261. stick.Touched:connect(function(hit) damage(hit.Parent,10) end)
  262.  
  263. local tip = T.P(1,2,1,"Black",0,true,true)
  264. T.FM(tip,"spike",.5,2,.5)
  265. tip.CFrame = pos
  266.  
  267. local fish = T.P(1,1,1,"White",0,false,true)
  268. fish.CFrame = pos
  269. T.FM(fish,"fish",1,1,1,"fish").VertexColor = v3n(.5,1,.5)
  270.  
  271.  
  272.  
  273. for i = 1,10 do
  274. wait()
  275. stick.Size = v3n(stick.Size.x,i,stick.Size.z)
  276. stick.CFrame = pos + v3n(0,stick.Size.y/2,0)
  277. tip.CFrame = stick.CFrame * cfn(0,stick.Size.y/2+.75,0)
  278. fish.CFrame = tip.CFrame * cfn(0,-1.5,0) * ang(M.D(85),0,0)
  279.  
  280. end
  281. wait(1)
  282. for i = 10,1,-1 do
  283. wait()
  284. stick.Size = v3n(stick.Size.x,i,stick.Size.z)
  285. stick.CFrame = pos + v3n(0,stick.Size.y/2,0)
  286. tip.CFrame = stick.CFrame * cfn(0,stick.Size.y/2+.75,0)
  287. fish.CFrame = tip.CFrame * cfn(0,-1.5,0) * ang(M.D(85),0,0)
  288. end
  289. for i,v in pairs({stick,tip,fish}) do v:Remove() end
  290. for i = 10,1,-1 do
  291. wait()
  292. msh.Scale = v3n(i,1,i)
  293. end
  294. portal:Remove()
  295. p:Remove()
  296.  
  297. end
  298. suit = nil
  299. function suitme()
  300. if suit == nil then
  301. for i,v in pairs(char:GetChildren()) do
  302. if v:IsA("Hat") then v:Remove() end
  303. end
  304. suit = Instance.new("Model",char)
  305. local head = T.P(1,1,1,"Black",0,false,false,suit)
  306. T.FM(head,"skull",1,1,1,"rainbow")
  307. T.W(head,body.Head,0,0,0,0,0,0)
  308. r = .2
  309. for i = 1,360,120 do
  310. T.W(T.FM(T.P(1,1,1,"Black",0,false,false,suit),"spike",.2,2,.2).Parent,head,M.Cos(M.D(i))*r,1.5,M.Sin(M.D(i))*r,0,0,0)
  311. end
  312. allowed = true
  313. for i = 1,360,60 do
  314. wait()
  315. p = T.P(1,1,1,"Magenta",.5,false,false,suit)
  316. T.FM(p,"penguin",.5,.5,.5)
  317. local wld = T.W(p,body.Head,M.Cos(M.D(i))*.7,2,M.Sin(M.D(i))*.7,0,0,0)
  318.  
  319. T.C(function()
  320. while true do
  321. wait()
  322. if allowed == true then
  323. for o = .7,1,.05 do
  324. wait()
  325. wld.C1 = cfn(M.Cos(M.D(i))*o,2,M.Sin(M.D(i))*o)
  326. end
  327. for o = 1,.7,-.05 do
  328. wait()
  329. wld.C1 = cfn(M.Cos(M.D(i))*o,2,M.Sin(M.D(i))*o)
  330. end
  331. end
  332. end
  333. end)
  334.  
  335. end
  336. local glove = T.P(2,.5,2,"White",0,false,false,suit)
  337. T.FM(glove,"cylinder",1,1,1)
  338. T.W(glove,body.A.R,0,-.7,0,0,0,0)
  339. local ball = T.P(2,2,2,"Bright red",0,false,false,suit)
  340. T.FM(ball,"sphere",1,1,1)
  341. T.W(ball,body.A.R,0,-1.5,0,0,0,0)
  342.  
  343. lock("RS",1)
  344. rw.C0 = rw.C0 * ang(0,0,M.D(85))
  345. ball.Touched:connect(function(hit) damage(hit.Parent,20) end)
  346. else suit:Remove() lock("RS",0) suit = nil
  347. end
  348. end
  349.  
  350. function punch(mouse)
  351. rw.C0 = normposR*ang(0,0,math.pi)
  352.  
  353. fir = T.F(ball,5,1,"Deep blue","Cyan")
  354.  
  355. bp = T.BP(torso,torso.Position + v3n(0,10,0))
  356. while (torso.Position-bp.position).magnitude > 3 do wait() end
  357. holding = true
  358. gyro = T.BG(torso)
  359. allowed = false
  360. while holding do
  361. wait()
  362. gyro.cframe = mouse.hit
  363. end
  364. gyro.cframe = cfn(torso.Position,mouse.hit.p)*ang(math.pi/2,0,0)
  365. bp.position = mouse.hit.p + v3n(0,5,0)
  366. while (torso.Position-bp.position).magnitude > 3 do wait() gyro.cframe = gyro.cframe * ang(0,M.D(100),0) end
  367. gyro:Remove() bp:Remove() fir:Remove()
  368. rw.C0 = normposR*ang(0,0,math.pi/2)
  369. allowed = true
  370. end
  371.  
  372. hop.Selected:connect(function(mouse)
  373. mouse.Button1Up:connect(function() holding = false end)
  374. mouse.Button1Down:connect(function() if suit == nil then attack1(mouse) else punch(mouse) end end)
  375. mouse.KeyDown:connect(function(key)
  376. if key == "f" then spear(mouse)
  377. elseif key == "r" then suitme()
  378. end
  379. end)
  380. end)
Add Comment
Please, Sign In to add comment