Advertisement
Roblox_Xploits

DreamState {Leaking MY script}

Dec 2nd, 2016
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 47.10 KB | None | 0 0
  1. --HEY GUYS roblox_Xploits here leaking MY script
  2. local p = game.Players.LocalPlayer
  3. local char = p.Character
  4. local mouse = p:GetMouse()
  5. local larm = char["Left Arm"]
  6. local rarm = char["Right Arm"]
  7. local lleg = char["Left Leg"]
  8. local rleg = char["Right Leg"]
  9. local hed = char.Head
  10. local torso = char.Torso
  11. local hum = char.Humanoid
  12. local cam = game.Workspace.CurrentCamera
  13. local root = char.HumanoidRootPart
  14. local deb = false
  15. local shot = 0
  16. local debris=game:service"Debris"
  17. local l = game:GetService("Lighting")
  18. local rs = game:GetService("RunService").RenderStepped
  19. ptz = {0.8, 0.85, 0.9, 0.95, 1, 1.05, 1.1}
  20. math.randomseed(os.time())
  21. for i,v in pairs(char:children()) do
  22. if v:IsA("Hat") then
  23. v:Destroy()
  24. end
  25. end
  26. for i,v in pairs (hed:GetChildren()) do
  27. if v:IsA("Sound") then
  28. v:Destroy()
  29. end
  30. end
  31.  
  32. CV="Black"
  33.  
  34. local txt = Instance.new("BillboardGui", char)
  35. txt.Adornee = char .Head
  36. txt.Name = "_status"
  37. txt.Size = UDim2.new(2, 0, 1.2, 0)
  38. txt.StudsOffset = Vector3.new(-1, 1, 0)
  39. local text = Instance.new("TextLabel", txt)
  40. text.Size = UDim2.new(2, 0, 0.5, 0)
  41. text.FontSize = "Size8"
  42. text.TextScaled = true
  43. text.TextTransparency = 0
  44. text.BackgroundTransparency = 1
  45. text.TextTransparency = 0
  46. text.TextStrokeTransparency = 0
  47. text.Font = "Arial"
  48. text.TextStrokeColor3 = Color3.new(0,0,0)
  49.  
  50. v=Instance.new("Part")
  51. v.Name = "ColorBrick"
  52. v.Parent=p.Character
  53. v.FormFactor="Symmetric"
  54. v.Anchored=true
  55. v.CanCollide=false
  56. v.BottomSurface="Smooth"
  57. v.TopSurface="Smooth"
  58. v.Size=Vector3.new(10,5,3)
  59. v.Transparency=0.7
  60. v.CFrame=char.Torso.CFrame
  61. v.BrickColor=BrickColor.new(CV)
  62. v.Transparency=1
  63. text.TextColor3 = v.BrickColor.Color
  64. v.Shape="Block"
  65. text.Text = "Dream State"
  66.  
  67. ----------------------------------------------------
  68. Debounces = {
  69. CanAttack = true;
  70. NoIdl = false;
  71. Slashing = false;
  72. Slashed = false;
  73. RPunch = false;
  74. RPunched = false;
  75. LPunch = false;
  76. LPunched = false;
  77. }
  78. local Touche = {char.Name, }
  79. ----------------------------------------------------
  80. hed.face.Texture = "rbxassetid://0"
  81. char["Body Colors"].HeadColor = BrickColor.new("Black")
  82. --------------------------------------
  83. local plr = game:service'Players'.LocalPlayer
  84. local char = plr.Character
  85. local mouse = plr:GetMouse()
  86. local humanoid = char:findFirstChild("Humanoid")
  87. local torso = char:findFirstChild("Torso")
  88. local head = char.Head
  89. local cam = workspace.CurrentCamera
  90. mouse.Button1Down:connect(function()
  91. hit = mouse.Target
  92. if hit ~= nil and hit.Name ~= "Base" then
  93. hit:BreakJoints()
  94. hit.Anchored = false
  95. local bp = Instance.new("BodyPosition", hit)
  96. bp.maxForce = Vector3.new(hit:GetMass()*196.2, hit:GetMass()*196.2,hit:GetMass()*196.2)
  97. bp.D = 500
  98. for _ = 0, 2 do
  99. local p = Instance.new("Part", char)
  100. p.BrickColor = BrickColor.random()
  101. p.Shape = "Ball"
  102. p.FormFactor = "Custom"
  103. p.CFrame = hit.CFrame * CFrame.new(math.random(-1, 1),math.random(-1, 1),math.random(-1, 1))
  104. local bp2 = Instance.new("BodyPosition", p)
  105. bp2.maxForce = Vector3.new(p:GetMass()*196.2, p:GetMass()*196.2,p:GetMass()*196.2)
  106. bp2.D = 3000
  107. bp2.position = head.Position
  108. p.Size = Vector3.new(0.5, 0.5, 0.5)
  109. game:service'Debris':AddItem(p, 1)
  110. end
  111. while hit ~= nil and wait() do
  112. if bp ~= nil then
  113. bp.position = torso.Position
  114. end
  115. if (hit.Position - torso.Position).magnitude < 4 then
  116. hit:Destroy()
  117. break
  118. end
  119. end
  120. end
  121. end)
  122.  
  123. ----------------------------------------------
  124. z = Instance.new("Sound", char)
  125. z.SoundId = "rbxassetid://181086214"--303570180
  126. z.Looped = true
  127. z.Pitch = 1
  128. z.Volume = 1
  129. wait(.1)
  130. z:Play()
  131. ------------------------------
  132. local verlet = {}
  133. verlet.step_time = 1 / 50
  134. verlet.gravity = Vector3.new(0, -10, 0)
  135.  
  136. local char = game.Players.LocalPlayer.Character
  137. local torso = char:WaitForChild("Torso")
  138. local parts = {}
  139. local render = game:GetService("RunService").RenderStepped
  140.  
  141. wait(2)
  142.  
  143. local point = {}
  144. local link = {}
  145. local rope = {}
  146.  
  147. local function ccw(A,B,C)
  148. return (C.y-A.y) * (B.x-A.x) > (B.y-A.y) * (C.x-A.x)
  149. end
  150.  
  151. local function intersect(A,B,C,D)
  152. return ccw(A,C,D) ~= ccw(B,C,D) and ccw(A,B,C) ~= ccw(A,B,D)
  153. end
  154.  
  155. local function vec2(v)
  156. return Vector2.new(v.x, v.z)
  157. end
  158.  
  159. function point:step()
  160. if not self.fixed then
  161. local derivative = (self.position - self.last_position) * 0.95
  162. self.last_position = self.position
  163. self.position = self.position + derivative + (self.velocity * verlet.step_time ^ 2)
  164. --[[local torsoP = torso.CFrame * CFrame.new(-1, 0, 0.5)
  165. local torsoE = torso.CFrame * CFrame.new(1, 0, 0.5)
  166. local pointE = self.position + torso.CFrame.lookVector * 100
  167. local doIntersect = intersect(vec2(torsoP.p), vec2(torsoE.p), vec2(self.position), vec2(pointE))
  168. if not doIntersect then
  169. self.postition = self.position - torso.CFrame.lookVector * 10
  170. end]]
  171. end
  172. end
  173.  
  174. function link:step()
  175. for i = 1, 1 do
  176. local distance = self.point1.position - self.point2.position
  177. local magnitude = distance.magnitude
  178. local differance = (self.length - magnitude) / magnitude
  179. local translation = ((self.point1.fixed or self.point2.fixed) and 1 or 0.6) * distance * differance
  180. if not self.point1.fixed then
  181. self.point1.position = self.point1.position + translation
  182. end
  183. if not self.point2.fixed then
  184. self.point2.position = self.point2.position - translation
  185. end
  186. end
  187. end
  188.  
  189. function verlet.new(class, a, b, c)
  190. if class == "Point" then
  191. local new = {}
  192. setmetatable(new, {__index = point})
  193. new.class = class
  194. new.position = a or Vector3.new()
  195. new.last_position = new.position
  196. new.velocity = verlet.gravity
  197. new.fixed = false
  198. return new
  199. elseif class == "Link" then
  200. local new = {}
  201. setmetatable(new, {__index = link})
  202. new.class = class
  203. new.point1 = a
  204. new.point2 = b
  205. new.length = c or (a.position - b.position).magnitude
  206. return new
  207. elseif class == "Rope" then
  208. local new = {}
  209. setmetatable(new, {__index = link})
  210. new.class = class
  211. new.start_point = a
  212. new.finish_point = b
  213. new.points = {}
  214. new.links = {}
  215. local inc = (b - a) / 10
  216. for i = 0, 10 do
  217. table.insert(new.points, verlet.new("Point", a + (i * inc)))
  218. end
  219. for i = 2, #new.points do
  220. table.insert(new.links, verlet.new("Link", new.points[i - 1], new.points[i]))
  221. end
  222. return new
  223. end
  224. end
  225.  
  226. local tris = {}
  227. local triParts = {}
  228.  
  229. local function GetDiscoColor(hue)
  230. local section = hue % 1 * 3
  231. local secondary = 0.5 * math.pi * (section % 1)
  232. if section < 1 then
  233. return Color3.new(10, 10, 10)
  234. elseif section < 2 then
  235. return Color3.new(10, 10, 10)
  236. else
  237. return Color3.new(10,10, 10)
  238. end
  239. end
  240.  
  241. local function setupPart(part)
  242. part.Anchored = true
  243. part.FormFactor = 3
  244. part.CanCollide = false
  245. part.TopSurface = 10
  246. part.BottomSurface = 10
  247. part.LeftSurface = 10
  248. part.RightSurface = 10
  249. part.FrontSurface = 10
  250. part.BackSurface = 10
  251. part.Material = "Foil"
  252. local m = Instance.new("SpecialMesh", part)
  253. m.MeshType = "Wedge"
  254. m.Scale = Vector3.new(0.2, 1, 1)
  255. return part
  256. end
  257.  
  258. local function CFrameFromTopBack(at, top, back)
  259. local right = top:Cross(back)
  260. return CFrame.new(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
  261. end
  262.  
  263. local function drawTri(parent, a, b, c)
  264. local this = {}
  265. local mPart1 = table.remove(triParts, 1) or setupPart(Instance.new("Part"))
  266. local mPart2 = table.remove(triParts, 1) or setupPart(Instance.new("Part"))
  267. function this:Set(a, b, c)
  268. local ab, bc, ca = b-a, c-b, a-c
  269. local abm, bcm, cam = ab.magnitude, bc.magnitude, ca.magnitude
  270. local edg1 = math.abs(0.5 + ca:Dot(ab)/(abm*abm))
  271. local edg2 = math.abs(0.5 + ab:Dot(bc)/(bcm*bcm))
  272. local edg3 = math.abs(0.5 + bc:Dot(ca)/(cam*cam))
  273. if edg1 < edg2 then
  274. if edg1 >= edg3 then
  275. a, b, c = c, a, b
  276. ab, bc, ca = ca, ab, bc
  277. abm = cam
  278. end
  279. else
  280. if edg2 < edg3 then
  281. a, b, c = b, c, a
  282. ab, bc, ca = bc, ca, ab
  283. abm = bcm
  284. else
  285. a, b, c = c, a, b
  286. ab, bc, ca = ca, ab, bc
  287. abm = cam
  288. end
  289. end
  290.  
  291. local len1 = -ca:Dot(ab)/abm
  292. local len2 = abm - len1
  293. local width = (ca + ab.unit*len1).magnitude
  294.  
  295. local maincf = CFrameFromTopBack(a, ab:Cross(bc).unit, -ab.unit)
  296.  
  297. if len1 > 0.2 then
  298. mPart1.Parent = parent
  299. mPart1.Size = Vector3.new(0.2, width, len1)
  300. mPart1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
  301. else
  302. mPart1.Parent = nil
  303. end
  304.  
  305. if len2 > 0.2 then
  306. mPart2.Parent = parent
  307. mPart2.Size = Vector3.new(0.2, width, len2)
  308. mPart2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
  309. else
  310. mPart2.Parent = nil
  311. end
  312. end
  313. function this:SetProperty(prop, value)
  314. mPart1[prop] = value
  315. mPart2[prop] = value
  316. end
  317. this:Set(a, b, c)
  318. function this:Destroy()
  319. mPart1:Destroy()
  320. mPart2:Destroy()
  321. end
  322. this.p1 = mPart1
  323. this.p2 = mPart2
  324. this.p1.BrickColor = BrickColor.new(GetDiscoColor(math.noise(0.5, 0.5, this.p1.CFrame.Y * 0.5 + time())))
  325. this.p2.BrickColor = BrickColor.new(GetDiscoColor(math.noise(0.5, 0.5, this.p2.CFrame.Y * 0.5 + time())))
  326. return this
  327. end
  328.  
  329. function verlet.draw(object, id)
  330. if object.class == "Point" then
  331. local part = parts[id]
  332. part.BrickColor = BrickColor.new(107, 0, 107)
  333. part.Transparency = 0
  334. part.formFactor = 3
  335. part.Anchored = true
  336. part.CanCollide = false
  337. part.TopSurface = 0
  338. part.BottomSurface = 0
  339. part.Size = Vector3.new(0.35, 0.35, 0.35)
  340. part.Material = "Smooth plastic"
  341. part.CFrame = CFrame.new(object.position)
  342. part.Parent = torso
  343. return part
  344. elseif object.class == "Link" then
  345. local part = parts[id]
  346. local dist = (object.point1.position - object.point2.position).magnitude
  347. part.Size = Vector3.new(0.2, 0.2, dist)
  348. part.CFrame = CFrame.new(object.point1.position, object.point2.position) * CFrame.new(0, 0, dist * -0.5)
  349. part.Parent = torso
  350. return part
  351. end
  352. end
  353.  
  354. function verlet.clear()
  355. for _, v in pairs(workspace:GetChildren()) do
  356. if v.Name == "Part" then
  357. v:Destroy()
  358. end
  359. end
  360. end
  361.  
  362. local points = {}
  363. local links = {}
  364.  
  365. for x = 0, 2 do
  366. points[x] = {}
  367. for y = 0, 3 do
  368. points[x][y] = verlet.new("Point", torso.Position + Vector3.new(x * 0.8 - 2, 2 - y * 0.8, 5 + y * 0.4))
  369. points[x][y].fixed = y == 0
  370. end
  371. end
  372.  
  373. for x = 1, 2 do
  374. for y = 0, 3 do
  375. links[#links + 1] = verlet.new("Link", points[x][y], points[x - 1][y], 1 + y * 0.08)
  376. end
  377. end
  378.  
  379. for x = 0, 2 do
  380. for y = 1, 3 do
  381. links[#links + 1] = verlet.new("Link", points[x][y], points[x][y - 1], 1.2 + y * 0.03)
  382. end
  383. end
  384.  
  385. render:connect(function()
  386. for x = 0, 2 do
  387. for y = 0, 3 do
  388. if y == 0 then
  389. points[x][y].position = (torso.CFrame * CFrame.new(x * 1 - 1, 1, 0.5)).p
  390. else
  391. points[x][y]:step()
  392. end
  393. end
  394. end
  395. for i = 1, #links do
  396. links[i]:step()
  397. end
  398. for i = 1, #tris do
  399. triParts[#triParts + 1] = tris[i].p1
  400. triParts[#triParts + 1] = tris[i].p2
  401. end
  402. tris = {}
  403. for x = 1, 2 do
  404. for y = 1, 3 do
  405. tris[#tris + 1] = drawTri(torso, points[x - 1][y - 1].position, points[x - 1][y].position, points[x][y - 1].position)
  406. tris[#tris + 1] = drawTri(torso, points[x][y].position, points[x - 1][y].position, points[x][y - 1].position)
  407. end
  408. end
  409. end)
  410.  
  411. ----------------------
  412. do --CFrame lerp (stravant, clerp by AntiBoomz0r)
  413. local function QuaternionFromCFrame(cf)
  414. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  415. local trace = m00 + m11 + m22
  416. if trace > 0 then
  417. local s = math.sqrt(1 + trace)
  418. local recip = 0.5/s
  419. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  420. else
  421. local i = 0
  422. if m11 > m00 then
  423. i = 1
  424. end
  425. if m22 > (i == 0 and m00 or m11) then
  426. i = 2
  427. end
  428. if i == 0 then
  429. local s = math.sqrt(m00-m11-m22+1)
  430. local recip = 0.5/s
  431. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  432. elseif i == 1 then
  433. local s = math.sqrt(m11-m22-m00+1)
  434. local recip = 0.5/s
  435. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  436. elseif i == 2 then
  437. local s = math.sqrt(m22-m00-m11+1)
  438. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  439. end
  440. end
  441. end
  442. local function QuaternionToCFrame(px, py, pz, x, y, z, w)
  443. local xs, ys, zs = x + x, y + y, z + z
  444. local wx, wy, wz = w*xs, w*ys, w*zs
  445. local xx = x*xs
  446. local xy = x*ys
  447. local xz = x*zs
  448. local yy = y*ys
  449. local yz = y*zs
  450. local zz = z*zs
  451. return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy))
  452. end
  453. function QuaternionSlerp(a, b, t)
  454. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  455. local startInterp, finishInterp;
  456. if cosTheta >= 0.0001 then
  457. if (1 - cosTheta) > 0.0001 then
  458. local theta = math.acos(cosTheta)
  459. local invSinTheta = 1/math.sin(theta)
  460. startInterp = math.sin((1-t)*theta)*invSinTheta
  461. finishInterp = math.sin(t*theta)*invSinTheta
  462. else
  463. startInterp = 1-t
  464. finishInterp = t
  465. end
  466. else
  467. if (1+cosTheta) > 0.0001 then
  468. local theta = math.acos(-cosTheta)
  469. local invSinTheta = 1/math.sin(theta)
  470. startInterp = math.sin((t-1)*theta)*invSinTheta
  471. finishInterp = math.sin(t*theta)*invSinTheta
  472. else
  473. startInterp = t-1
  474. finishInterp = t
  475. end
  476. end
  477. return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp
  478. end
  479. function clerp(a,b,t)
  480. local qa = {QuaternionFromCFrame(a)}
  481. local qb = {QuaternionFromCFrame(b)}
  482. local ax, ay, az = a.x, a.y, a.z
  483. local bx, by, bz = b.x, b.y, b.z
  484. local _t = 1-t
  485. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  486. end
  487. end
  488.  
  489. plr = game:service'Players'.LocalPlayer
  490. char = plr.Character
  491. mouse = plr:GetMouse()
  492. humanoid = char:findFirstChild("Humanoid")
  493. torso = char:findFirstChild("Torso")
  494. head = char.Head
  495. ra = char:findFirstChild("Right Arm")
  496. la = char:findFirstChild("Left Arm")
  497. rl = char:findFirstChild("Right Leg")
  498. ll = char:findFirstChild("Left Leg")
  499. rs = torso:findFirstChild("Right Shoulder")
  500. ls = torso:findFirstChild("Left Shoulder")
  501. rh = torso:findFirstChild("Right Hip")
  502. lh = torso:findFirstChild("Left Hip")
  503. neck = torso:findFirstChild("Neck")
  504. rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
  505. animate = char:findFirstChild("Animate")
  506. if animate then
  507. animate:Destroy()
  508. end
  509. rootpart = char:findFirstChild("HumanoidRootPart")
  510. camera = workspace.CurrentCamera
  511.  
  512. gun = Instance.new("Model", char)
  513. gun.Name = "GunModel"
  514.  
  515. local rm = Instance.new("Motor", torso)
  516. rm.C0 = CFrame.new(1.5, 0.5, 0)
  517. rm.C1 = CFrame.new(0, 0.5, 0)
  518. rm.Part0 = torso
  519. rm.Part1 = ra
  520.  
  521. local lm = Instance.new("Motor", torso)
  522. lm.C0 = CFrame.new(-1.5, 0.5, 0)
  523. lm.C1 = CFrame.new(0, 0.5, 0)
  524. lm.Part0 = torso
  525. lm.Part1 = la
  526.  
  527. local rlegm = Instance.new("Motor", torso)
  528. rlegm.C0 = CFrame.new(0.5, -1, 0)
  529. rlegm.C1 = CFrame.new(0, 1, 0)
  530. rlegm.Part0 = torso
  531. rlegm.Part1 = rl
  532. rlegm.Name = "Right Hip"
  533.  
  534. local llegm = Instance.new("Motor", torso)
  535. llegm.C0 = CFrame.new(-0.5, -1, 0)
  536. llegm.C1 = CFrame.new(0, 1, 0)
  537. llegm.Part0 = torso
  538. llegm.Part1 = ll
  539. llegm.Name = "Left Hip"
  540.  
  541. neck.C0 = CFrame.new(0, 1, 0)
  542. neck.C1 = CFrame.new(0, -0.5, 0)
  543.  
  544. rj.C0 = CFrame.new(0, -1.5, 0)
  545. rj.C1 = CFrame.new(0, -1.5, 0)
  546.  
  547. --[[local hydrotankbase = Instance.new("Part", gun)
  548. hydrotankbase.BrickColor = BrickColor.Black()
  549. hydrotankbase.FormFactor = 'Custom'
  550. hydrotankbase.CanCollide = false
  551. hydrotankbase.Material = 'SmoothPlastic'
  552. hydrotankbase.TopSurface = 'SmoothNoOutlines'
  553. hydrotankbase.BottomSurface = 'SmoothNoOutlines'
  554. hydrotankbase.LeftSurface = 'SmoothNoOutlines'
  555. hydrotankbase.RightSurface = 'SmoothNoOutlines'
  556. hydrotankbase.BackSurface = 'SmoothNoOutlines'
  557. hydrotankbase.FrontSurface = 'SmoothNoOutlines'
  558. hydrotankbase.Size = Vector3.new(1.2, .2, 1.2)
  559. Instance.new("CylinderMesh", hydrotankbase)
  560. local weld = Instance.new("Weld", hydrotankbase)
  561. weld.C0 = CFrame.new(torso.Size.x/2 - hydrotankbase.Size.x/2, .45, -torso.Size.z/2 - (hydrotankbase.Size.z/3))
  562. weld.Part0 = hydrotankbase
  563. weld.Part1 = torso
  564. local hydrotankbase2 = hydrotankbase:clone()
  565. hydrotankbase2.Parent = gun
  566. local weld = Instance.new("Weld", hydrotankbase)
  567. weld.C0 = CFrame.new(-torso.Size.x/2 + hydrotankbase2.Size.x/2, .45, -torso.Size.z/2 - (hydrotankbase2.Size.z/3))
  568. weld.Part0 = hydrotankbase2
  569. weld.Part1 = torso
  570. local hydroglass = hydrotankbase:clone()
  571. hydroglass.Parent = gun
  572. hydroglass.Size = Vector3.new(1.1, 1.5, 1.1)
  573. hydroglass.BrickColor = BrickColor.Black()
  574. hydroglass.Transparency = .2
  575. local weld = Instance.new("Weld", hydroglass)
  576. weld.C0 = CFrame.new(0, -hydrotankbase.Size.y/2 - hydroglass.Size.y/2, 0)
  577. weld.Part0 = hydroglass
  578. weld.Part1 = hydrotankbase
  579. local hydroglass2 = hydroglass:clone()
  580. hydroglass2.Parent = gun
  581. local weld = Instance.new("Weld", hydrotankbase)
  582. weld.C0 = CFrame.new(0, -hydrotankbase.Size.y/2 - hydroglass2.Size.y/2, 0)
  583. weld.Part0 = hydroglass2
  584. weld.Part1 = hydrotankbase2
  585. local hydrotanktop = hydrotankbase:clone()
  586. hydrotanktop.Parent = gun
  587. local weld = Instance.new("Weld", hydrotankbase)
  588. weld.C0 = CFrame.new(0,- hydroglass2.Size.y/2 - hydrotanktop.Size.y/2,0)
  589. weld.Part0 = hydrotanktop
  590. weld.Part1 = hydroglass
  591. local hydrotanktop2 = hydrotankbase:clone()
  592. hydrotanktop2.Parent = gun
  593. local weld = Instance.new("Weld", hydrotankbase)
  594. weld.C0 = CFrame.new(0,- hydroglass2.Size.y/2 - hydrotanktop2.Size.y/2,0)
  595. weld.Part0 = hydrotanktop2
  596. weld.Part1 = hydroglass2
  597.  
  598. local hydrogen = hydrotankbase:clone()
  599. hydrogen.Parent = gun
  600. hydrogen.Material = 'Ice'
  601. hydrogen.Size = Vector3.new(1, 1.5, 1)
  602. hydrogen.BrickColor = BrickColor.Black()
  603. local weld = Instance.new("Weld", hydrogen)
  604. weld.C0 = CFrame.new(0, -hydrotankbase.Size.y/2 - hydroglass.Size.y/2, 0)
  605. weld.Part0 = hydrogen
  606. weld.Part1 = hydrotankbase
  607. local hydrogen2 = hydrogen:clone()
  608. hydrogen2.Parent = gun
  609. local weld = Instance.new("Weld", hydrogen2)
  610. weld.C0 = CFrame.new(0, -hydrotankbase.Size.y/2 - hydroglass2.Size.y/2, 0)
  611. weld.Part0 = hydrogen2
  612. weld.Part1 = hydrotankbase2]]--
  613.  
  614. rsc0 = rm.C0
  615. lsc0 = lm.C0
  616. neckc0 = neck.C0
  617. rootc0 = rj.C0
  618. llc0 = llegm.C0
  619. rlc0 = rlegm.C0
  620. speed = 0.25
  621. angle = 0
  622. mvmnt = 0
  623. anglespeed = 1
  624. humanoid.WalkSpeed = 8
  625. ctrl = false
  626. stopsprint = false
  627. action = false
  628. sprinting = false
  629. mouse.KeyDown:connect(function(k)
  630. repeat wait() until action == false
  631. if not action then
  632. if k:byte() == 48 then
  633. sprinting = true
  634. humanoid.WalkSpeed = 16
  635. end
  636. if k == '2' then
  637. ctrl = true
  638. humanoid.WalkSpeed = 5
  639. end
  640. end
  641. end)
  642.  
  643. mouse.KeyUp:connect(function(k)
  644. repeat wait() until action == false
  645. if not action then
  646. repeat wait() until action == false
  647. if k:byte() == 48 then
  648. sprinting = false
  649. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 10 and hitz then
  650. action = 'StopSprinting'
  651. end
  652. humanoid.WalkSpeed = 8
  653. if ctrl then
  654. humanoid.WalkSpeed = 5
  655. end
  656. end
  657. if k == '2' then
  658. ctrl = false
  659. humanoid.WalkSpeed = 8
  660. end
  661. end
  662. end)
  663.  
  664. Controls = game:service'ControllerService':children()[1]
  665.  
  666. local fakehead = head:clone()
  667. fakehead.Parent = head
  668. head.Transparency = 1
  669. for i,v in pairs(fakehead:children()) do
  670. if v:IsA'Sound' or v:IsA'Sound' then
  671. v:Destroy()
  672. end
  673. end
  674.  
  675. waitingloop = false
  676.  
  677. local fakeweld = Instance.new("Weld", head)
  678. fakeweld.Part0 = head
  679. fakeweld.Part1 = fakehead
  680.  
  681. humanoid.Jumping:connect(function()
  682. if not action then
  683. action = 'Jumping'
  684. end
  685. end)
  686.  
  687. game:service'RunService'.RenderStepped:connect(function()
  688. if not loopedaction then
  689. local rscf = rsc0
  690. local lscf = lsc0
  691. local rlcf = rlc0
  692. local llcf = llc0
  693. local rjcf = rootc0
  694. local ncf = neckc0
  695. local rayz = Ray.new(rootpart.Position, Vector3.new(0, -4.1, 0))
  696. local hitz, enz = workspace:findPartOnRay(rayz, char)
  697. angle = (angle % 100) + anglespeed/10
  698. mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10))
  699. if action ~= false then
  700. if action == 'StopSprinting' then
  701. Controls.Parent = nil
  702. local bodyvelocity = Instance.new("BodyVelocity", rootpart)
  703. bodyvelocity.maxForce = Vector3.new(1/0,0,1/0)
  704. bodyvelocity.velocity = rootpart.CFrame.lookVector * 16
  705. ncf = neckc0 * CFrame.Angles(math.rad(-15), -math.rad(65), 0)
  706. rscf = rsc0 * CFrame.Angles(math.rad(-22), 0, math.rad(20.5))
  707. lscf = lsc0 * CFrame.Angles(math.rad(-54.5), 0, -math.rad(18.5))
  708. rjcf = rootc0 * CFrame.new(0, -.35, 0) * CFrame.Angles(math.rad(35), math.rad(70), 0)
  709. llcf = llc0 * CFrame.new(0, .25, -.25) * CFrame.Angles(0, 0, -math.rad(58))
  710. rlcf = rlcf * CFrame.new(0, -.25, -.15) * CFrame.Angles(0, 0, math.rad(10))
  711. loopedaction = true
  712. for i = 0, 25 do
  713. bodyvelocity.velocity = rootpart.CFrame.lookVector * (16 - i/2)
  714. rm.C0 = clerp(rm.C0,rscf,speed)
  715. lm.C0 = clerp(lm.C0,lscf,speed)
  716. rj.C0 = clerp(rj.C0,rjcf,speed)
  717. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  718. llegm.C0 = clerp(llegm.C0,llcf,speed)
  719. neck.C0 = clerp(neck.C0,ncf,speed)
  720. wait()
  721. end
  722. bodyvelocity:Destroy()
  723. loopedaction = false
  724. stopsprint = false
  725. action = false
  726. Controls.Parent = game:service'ControllerService'
  727. humanoid.WalkSpeed = 8
  728. if ctrl then
  729. humanoid.WalkSpeed = 5
  730. end
  731. end
  732. if action == 'Jumping' then
  733. loopedaction = true
  734. ncf = neckc0 * CFrame.Angles(-math.sin(angle)*0.07, 0, 0)
  735. rjcf = rootc0 * CFrame.Angles(math.sin(angle)*0.025, 0, 0)
  736. rscf = rsc0 * CFrame.Angles(-math.pi/16, -math.sin(angle)*0.08, 0)
  737. lscf = lsc0 * CFrame.Angles(-math.pi/17, math.sin(angle)*0.08, 0)
  738. rlcf = rlc0 * CFrame.Angles(-math.pi/16+-math.sin(angle)*0.125, -math.sin(angle)*0.08, math.rad(2.5))
  739. llcf = llc0 * CFrame.Angles(-math.pi/17+-math.sin(angle)*0.125, math.sin(angle)*0.08, -math.rad(2.5))
  740. for i = 0, 12 do
  741. rm.C0 = clerp(rm.C0,rscf,speed)
  742. lm.C0 = clerp(lm.C0,lscf,speed)
  743. rj.C0 = clerp(rj.C0,rjcf,speed)
  744. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  745. llegm.C0 = clerp(llegm.C0,llcf,speed)
  746. neck.C0 = clerp(neck.C0,ncf,speed)
  747. wait()
  748. end
  749. loopedaction = false
  750. action = false
  751. end
  752. end
  753. if goinup and torso.Velocity.y <= 2 then
  754. goinup = false
  755. if ctrl then
  756. humanoid.WalkSpeed = 32
  757. elseif sprinting then
  758. humanoid.WalkSpeed = 16
  759. elseif not sprinting and not ctrl then
  760. humanoid.WalkSpeed = 10
  761. end
  762. end
  763. if not action then
  764. if not hitz then
  765. anglespeed = 1
  766. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 15 then
  767. if not waitingloop then
  768. waitingloop = true
  769. coroutine.wrap(function()
  770. repeat wait() until hitz
  771. action = 'StopSprinting'
  772. end)()
  773. end
  774. end
  775. ncf = neckc0 * CFrame.Angles(-math.sin(angle)*0.07, 0, 0)
  776. rjcf = rootc0 * CFrame.Angles(math.sin(angle)*0.025, 0, 0)
  777. rscf = rsc0 * CFrame.Angles(-math.pi/19, -math.sin(angle)*0.08, math.rad(20.5))
  778. lscf = lsc0 * CFrame.Angles(-math.pi/24, math.sin(angle)*0.08, -math.rad(20.5))
  779. rlcf = rlc0 * CFrame.Angles(math.pi/24+-math.sin(angle)*0.025, -math.sin(angle)*0.08, math.rad(2.5))
  780. llcf = llc0 * CFrame.Angles(math.pi/24+-math.sin(angle)*0.025, math.sin(angle)*0.08, -math.rad(2.5))
  781. elseif torso.Velocity.y >= 2 and hitz then
  782. anglespeed = 1.75
  783. goinup = true
  784. humanoid.WalkSpeed = 5
  785. rjcf = rootc0 * CFrame.Angles(-math.pi/64, 0, 0)
  786. rscf = rsc0 * CFrame.new(0, 0, math.sin(angle)*0.125) * CFrame.Angles(math.pi/24+math.sin(angle)*.5, 0, -math.abs(mvmnt)*0.02)
  787. lscf = lsc0 * CFrame.new(0, 0, math.sin(angle)*0.125) * CFrame.Angles(math.pi/24+math.sin(-angle)*.5, 0, math.abs(mvmnt)*0.02)
  788. rlcf = rlc0 * CFrame.new(0, .45+math.abs(math.sin(angle))*.4, -.25+math.sin(angle)*0.2) * CFrame.Angles(math.sin(-angle)*.45, 0, math.rad(.5))
  789. llcf = llc0 * CFrame.new(0, .85-math.abs(math.sin(angle))*.4, -.25-math.sin(angle)*0.2) * CFrame.Angles(math.sin(angle)*.45, 0, -math.rad(.5))
  790. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude <= 2 then
  791. if not goinup then
  792. if stopsprint then
  793. action = 'StopSprinting'
  794. end
  795. anglespeed = 0.15
  796. if ctrl then
  797. ncf = neckc0 * CFrame.Angles(-math.sin(angle)*0.07, 0, 0)
  798. rscf = rsc0 * CFrame.Angles(0, -math.sin(angle)*0.08, 0)
  799. lscf = lsc0 * CFrame.Angles(0, math.sin(angle)*0.08, 0)
  800. rjcf = rootc0 * CFrame.new(0, -1.25, 0)
  801. llcf = llc0 * CFrame.new(0, 0, -.45) * CFrame.Angles(-math.pi/2.2, 0, 0)
  802. rlcf = rlcf * CFrame.new(0, 1.25, -.85)
  803. elseif not ctrl then
  804. ncf = neckc0 * CFrame.Angles(-math.sin(angle)*0.07, 0, 0)
  805. rjcf = rootc0 * CFrame.Angles(math.sin(angle)*0.025, 0, 0)
  806. rscf = rsc0 * CFrame.Angles(0, -math.sin(angle)*0.08, 0)
  807. lscf = lsc0 * CFrame.Angles(0, math.sin(angle)*0.08, 0)
  808. rlcf = rlc0 * CFrame.Angles(-math.sin(angle)*0.025, -math.sin(angle)*0.08, math.rad(2.5))
  809. llcf = llc0 * CFrame.Angles(-math.sin(angle)*0.025, math.sin(angle)*0.08, -math.rad(2.5))
  810. end
  811. end
  812. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude <= 10 then
  813. if not goinup then
  814. if stopsprint then
  815. action = 'StopSprinting'
  816. end
  817. anglespeed = 1.5
  818. if ctrl then
  819. rscf = rsc0 * CFrame.new(0, 0, math.sin(angle)*0.125) * CFrame.Angles(math.pi/24+math.sin(angle)*.5, 0, -math.abs(mvmnt)*0.02)
  820. lscf = lsc0 * CFrame.new(0, 0, math.sin(angle)*0.125) * CFrame.Angles(math.pi/24+math.sin(-angle)*.5, 0, math.abs(mvmnt)*0.02)
  821. rjcf = rootc0 * CFrame.new(0, -.7, 0) * CFrame.Angles(-math.pi/32, 0, 0)
  822. llcf = llc0 * CFrame.new(0, .65, -.5 + (-.4+math.sin(angle)*0.25)) * CFrame.Angles(math.pi/18 + -math.pi/10 - math.sin(angle)*.45, 0, 0)
  823. rlcf = rlcf * CFrame.new(0, .65, -.5 + (-.25-math.sin(angle)*0.25)) * CFrame.Angles(math.pi/18 + -math.pi/10 + math.sin(angle)*.45, 0, 0)
  824. else
  825. rjcf = rootc0 * CFrame.Angles(-math.pi/64, 0, 0)
  826. rscf = rsc0 * CFrame.new(0, 0, math.sin(angle)*0.125) * CFrame.Angles(math.pi/24+math.sin(angle)*.5, 0, -math.abs(mvmnt)*0.02)
  827. lscf = lsc0 * CFrame.new(0, 0, math.sin(angle)*0.125) * CFrame.Angles(math.pi/24+math.sin(-angle)*.5, 0, math.abs(mvmnt)*0.02)
  828. rlcf = rlc0 * CFrame.new(0, 0, -.15+math.sin(angle)*0.1) * CFrame.Angles(math.sin(-angle)*.45, 0, math.rad(.5))
  829. llcf = llc0 * CFrame.new(0, 0, -.15-math.sin(angle)*0.1) * CFrame.Angles(math.sin(angle)*.45, 0, -math.rad(.5))
  830. end
  831. end
  832. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 15 then
  833. if not goinup then
  834. stopsprint = true --when released
  835. anglespeed = 2
  836. local RotVelocityZ = torso.RotVelocity.Y
  837. if RotVelocityZ >= 15 then
  838. RotVelocityZ = 15
  839. elseif RotVelocityZ <= -15 then
  840. RotVelocityZ = -15
  841. end
  842. ncf = neckc0 * CFrame.Angles(0, -math.sin(angle)*.1, 0)
  843. rscf = rsc0 * CFrame.new(0, 0, math.sin(angle)*0.125) * CFrame.Angles(math.pi/24+math.sin(angle)*1.1, 0, -math.abs(mvmnt)*0.02)
  844. lscf = lsc0 * CFrame.new(0, 0, math.sin(angle)*0.125) * CFrame.Angles(math.pi/24+math.sin(-angle)*1.1, 0, math.abs(mvmnt)*0.02)
  845. rjcf = rootc0 * CFrame.new(0, 0, 0) * CFrame.Angles(-math.pi/18, math.sin(angle)*.1, math.sin(angle)*.045 + math.rad(RotVelocityZ)*2.5)
  846. rlcf = rlc0 * CFrame.new(0, 0, -.6+math.abs(mvmnt)*0.125) * CFrame.Angles(-math.pi/18+math.sin(-angle)*1.3, 0, math.rad(.5))
  847. llcf = llc0 * CFrame.new(0, 0, -math.abs(mvmnt)*0.125) * CFrame.Angles(-math.pi/18+math.sin(angle)*1.3, 0, -math.rad(.5))
  848. end
  849. end
  850. end
  851. rm.C0 = clerp(rm.C0,rscf,speed)
  852. lm.C0 = clerp(lm.C0,lscf,speed)
  853. rj.C0 = clerp(rj.C0,rjcf,speed)
  854. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  855. llegm.C0 = clerp(llegm.C0,llcf,speed)
  856. neck.C0 = clerp(neck.C0,ncf,speed)
  857. end
  858. end)
  859. ------------------------------------
  860. ply = game.Players.LocalPlayer
  861. char = ply.Character
  862. torso = char.Torso
  863. attacking = false
  864. track = false
  865. curcam = Workspace.CurrentCamera
  866. name = 'KFM'
  867.  
  868. pcall(function() char:FindFirstChild("legetony"):Remove() char:FindFirstChild("Belt"):Remove() end)
  869. m = Instance.new("Model",char) m.Name = "legetony"
  870.  
  871. cfn,ang = CFrame.new,CFrame.Angles
  872. v3n = Vector3.new
  873.  
  874. rs = torso["Right Shoulder"]
  875. ls = torso["Left Shoulder"]
  876. rh = torso["Right Hip"]
  877. lh = torso["Right Hip"]
  878. neck = torso["Neck"]
  879. rw,lw = nil,nil
  880. rhw,lhw = nil,nil
  881. local orgc1 = rs.C1
  882.  
  883. rarm = char["Right Arm"]
  884. larm = char["Left Arm"]
  885. rleg = char["Right Leg"]
  886. lleg = char["Left Leg"]
  887.  
  888. normposr = cfn(1.5,.5,0)
  889. normposl = cfn(-1.5,.5,0)
  890. normposr2 = cfn(-.5,-1.5,0)
  891. normposl2 = cfn(.5,-1.5,0)
  892. normposn = CFrame.new(0,1,0,-1,-0,-0,0,0,1,0,1,0)
  893.  
  894. holdpos = normposr*ang(math.pi/2,0,0)
  895. holdpos2 = normposl*ang(math.pi/2,0,0)
  896.  
  897. lock = {["R"] =
  898. function(a)
  899. if a == 1 then
  900. rabrick = T.P(1,1,1,"Black",1,false,false)
  901. rw = T.W(rabrick,torso,1.5,.5,0,0,0,0)
  902. T.W(rarm,rabrick,0,-.5,0,0,0,0)
  903. elseif a == 2 then
  904. rlbrick = T.P(1,1,1,"Black",1,false,false)
  905. rhw = T.W(rlbrick,torso,-.5,-1.5,0,0,0,0)
  906. T.W(rleg,rlbrick,0,-.5,0,0,0,0)
  907. elseif a == 0 then
  908. rs.Parent = torso
  909. rw.Parent = nil
  910. rabrick:Destroy() rabrick = nil
  911. elseif a == -1 then
  912. rhw.Parent = nil
  913. rh.Parent = torso
  914. rlbrick:Destroy() rlbrick = nil
  915. end
  916. end
  917. , ["L"] = function(a)
  918. if a == 1 then
  919. labrick = T.P(1,1,1,"Black",1,false,false)
  920. lw = T.W(labrick,torso,-1.5,.5,0,0,0,0)
  921. T.W(larm,labrick,0,-.5,0,0,0,0)
  922. elseif a == 2 then
  923. llbrick = T.P(1,1,1,"Black",1,false,false)
  924. lhw = T.W(llbrick,torso,.5,-1.5,0,0,0,0)
  925. T.W(lleg,llbrick,0,-.5,0,0,0,0)
  926. elseif a == 0 then
  927. ls.Parent = torso
  928. lw.Parent = nil
  929. labrick:Destroy() labrick = nil
  930. elseif a == -1 then
  931. lhw.Parent = nil
  932. lh.Parent = torso
  933. llbrick:Destroy() llbrick = nil
  934. end
  935. end}
  936.  
  937. ------TOOOOOLS------
  938. T = {["P"] = function(x,y,z,color,transparency,cancollide,anchored,parent,typee)
  939. if typee ~= nil then
  940. c = Instance.new("WedgePart",m)
  941. else
  942. c = Instance.new("Part",m)
  943. end
  944. c.TopSurface,c.BottomSurface = 0,0
  945. c.formFactor = "Custom"
  946. c.Size = Vector3.new(x,y,z)
  947. if color ~= "random" then
  948. c.BrickColor = BrickColor.new(color)
  949. else c.BrickColor = BrickColor:random() end
  950. c.Transparency = transparency
  951. c.CanCollide = cancollide
  952. if anchored ~= nil then c.Anchored = anchored end
  953. if parent ~= nil then c.Parent = parent end
  954. return c
  955.  
  956. end
  957. ,
  958. ["C"] = function(func) coroutine.resume(coroutine.create(func)) end
  959. ,
  960. ["W"] = function(part0,part1,x,y,z,rx,ry,rz,parent)
  961. w = Instance.new("Motor",m)
  962. if parent ~= nil then w.Parent = parent end
  963. w.Part0,w.Part1 = part0,part1
  964. w.C1 = CFrame.new(x,y,z) * CFrame.Angles(rx,ry,rz)
  965. return w
  966. end
  967. ,
  968. ["BG"] = function(parent)
  969. local c = Instance.new("BodyGyro",parent)
  970. c.P = 20e+003
  971. c.cframe = parent.CFrame
  972. c.maxTorque = Vector3.new(c.P,c.P,c.P)
  973. return c
  974. end
  975. ,
  976. ["BP"] = function(parent,position)
  977. local bp = Instance.new("BodyPosition",parent)
  978. bp.maxForce = Vector3.new()*math.huge
  979. bp.position = position
  980. return bp
  981. end
  982. ,
  983. ["F"] = function(parent,size,heat,color,secondcolor,enabled)
  984. f = Instance.new("Fire",parent)
  985. f.Size = size
  986. f.Heat = heat
  987. if enabled ~= nil then f.Enabled = enabled end
  988. if color ~= nil then f.Color = BrickColor.new(color).Color end
  989. if secondcolor ~= nil then f.SecondaryColor = BrickColor.new(secondcolor).Color end
  990. return f
  991. end
  992. ,
  993. ["FM"] = function(parent,meshid,x,y,z,meshtexture)
  994. if meshid == "cylinder" then
  995. mesh = Instance.new("CylinderMesh",parent)
  996. mesh.Scale = Vector3.new(x,y,z)
  997. return mesh
  998. else
  999. mesh = Instance.new("SpecialMesh",parent)
  1000.  
  1001. if meshid ~= "sphere" then
  1002. if type(meshid) == "number" then mesh.MeshId = "rbxassetid://"..meshid else
  1003. mesh.MeshId = "rbxassetid://"..meshids[meshid]
  1004. end
  1005.  
  1006. else mesh.MeshType = 3 end
  1007.  
  1008. mesh.Scale = Vector3.new(x,y,z)
  1009.  
  1010. if meshtexture ~= nil then
  1011. if type(meshtexture) == "number" then mesh.TextureId = "rbxassetid://"..meshtexture else
  1012. mesh.TextureId = "rbxassetid://"..textureids[meshtexture] end
  1013.  
  1014. end
  1015.  
  1016. return mesh
  1017. end
  1018. end
  1019. ,
  1020. ["Track"] = function(obj,s,t,lt,color,fade)
  1021. coroutine.resume(coroutine.create(function()
  1022. while track do
  1023. old = obj.Position
  1024. wait()
  1025. new = obj.Position
  1026.  
  1027. mag = (old-new).magnitude
  1028. dist = (old+new)/2
  1029.  
  1030. local ray = T.P(s,mag+.2,s,obj.Color,t,false,true)
  1031. Instance.new("CylinderMesh",ray)
  1032. ray.CFrame = CFrame.new(dist,old)*ang(math.pi/2,0,0)
  1033. if fade ~= nil then
  1034. delay(lt,function()
  1035. for i = t,1,fade do wait() ray.Transparency = i end ray:Remove() end)
  1036. else
  1037. game:GetService("Debris"):AddItem(ray,lt)
  1038. end
  1039. if color ~= nil then ray.BrickColor = BrickColor.new(color) end
  1040.  
  1041. end
  1042. end)) end
  1043. }
  1044. --------------------------------------------------
  1045. ----------------DAMAGE FUNCTION--------------------
  1046. function damage(hit,amount,show,del,poikkeus)
  1047. for i,v in pairs(hit:GetChildren()) do
  1048. if v:IsA("Humanoid") and v.Parent ~= char then
  1049.  
  1050. amo = 0
  1051. function showa(p)
  1052. if show == true then
  1053. for i,o in pairs(p:GetChildren()) do
  1054. if o:IsA("BillboardGui") and o.Name == "satuttava" then
  1055. amo = amo+1
  1056. end end
  1057.  
  1058.  
  1059. local bbg = Instance.new("BillboardGui",p)
  1060. bbg.Adornee = p.Torso
  1061. bbg.Name = "satuttava"
  1062. bbg.Size = UDim2.new(2,0,2,0)
  1063. bbg.StudsOffset = Vector3.new(0,6+amo*2,0)
  1064.  
  1065. local box = Instance.new("TextLabel",bbg)
  1066. box.Size = UDim2.new(1,0,1,0)
  1067. box.BackgroundColor = BrickColor.new("Black")
  1068. box.Text = amount
  1069. box.BackgroundTransparency = .5
  1070. if amount == 0 then box.Text = "K.O" end
  1071. box.Position = UDim2.new(0,0,0,0)
  1072. box.TextScaled = true
  1073. game:GetService("Debris"):AddItem(bbg,.5)
  1074. end
  1075. end
  1076.  
  1077. function dame(q)
  1078. if poikkeus ~= nil then
  1079. for _,u in pairs(poikkeus) do
  1080. if q.Parent.Name ~= u then
  1081. showa(q)
  1082. if amount == 0 then q.Parent:BreakJoints() end
  1083. q.Health = q.Health - amount
  1084. end
  1085. end
  1086. elseif poikkeus == nil then
  1087. if amount == 0 then q.Parent:BreakJoints() end
  1088. q.Health = q.Health - amount
  1089. showa(q)
  1090. end
  1091. end
  1092.  
  1093. if del ~= nil then
  1094. local find = v.Parent:FindFirstChild("hitted")
  1095. if find == nil then
  1096. dame(v)
  1097. val = Instance.new("BoolValue",v.Parent)val.Name="hitted"
  1098. game:GetService("Debris"):AddItem(val,del)
  1099. end
  1100. elseif del == nil then
  1101. dame(v)
  1102.  
  1103. end
  1104.  
  1105. end
  1106. end
  1107. end
  1108. -----------------------------------------------------------------
  1109.  
  1110. ------MESHIDS---
  1111. meshids = {["penguin"] = 15853464, ["ring"] = 3270017,
  1112. ["spike"] = 1033714,["cone"] = 1082802,["crown"] = 20329976,["crossbow"] = 15886761,
  1113. ["cloud"] = 1095708,["mjolnir"] = 1279013,["diamond"] = 9756362, ["hand"] = 37241605,
  1114. ["fist"] = 65322375,["skull"] = 36869983,["totem"] = 35624068,["spikeb"] = 9982590,["dragon"] = 58430372,["fish"] = 31221717, ["coffee"] = 15929962,["spiral"] = 1051557,
  1115. ["ramen"] = 19380188}---some meshids
  1116. textureids = {["cone"] = 1082804,["rainbow"] = 28488599,["fish"] = 31221733, ["coffee"] = 24181455,["monster"] = 33366441,["ramen"] = 19380153}
  1117. -----------------
  1118.  
  1119. ---MATH SHORTENINGS---
  1120. M = {["R"] = function(a,b) return math.random(a,b) end,
  1121. ["Cos"] = function(a) return math.cos(a) end,
  1122. ["Sin"] = function(a) return math.sin(a) end,
  1123. ["D"] = function(a) return math.rad(a) end
  1124. }
  1125.  
  1126. for i,v in pairs(char:GetChildren()) do
  1127. if v:IsA("Clothing") or v:IsA("Hat") then v:Remove()
  1128. end end
  1129.  
  1130. col = char:FindFirstChild("Body Colors")
  1131. if col == nil then col = Instance.new("BodyColors",char) end
  1132. collist = {
  1133. {'LeftLegColor',"Black"},
  1134. {'RightLegColor',"Black"},
  1135. {'TorsoColor',"Black"},
  1136. {'LeftArmColor',"Black"},
  1137. {'RightArmColor',"Black"},
  1138. }
  1139. for i,v in pairs(collist) do
  1140. col[v[1]] = BrickColor.new(v[2])
  1141. end
  1142. -------------------------------
  1143. shirt = Instance.new("Shirt", char)
  1144. shirt.Name = "Shirt"
  1145. pants = Instance.new("Pants", char)
  1146. pants.Name = "Pants"
  1147. char.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=279761704"
  1148. char.Pants.PantsTemplate = "http://www.roblox.com/asset/?id=279765514"
  1149. -------------------------------------
  1150. bracs = Instance.new("Model",m)
  1151. for i,v in pairs({rarm,larm}) do
  1152. for i,v in pairs(bracs:children()) do if v.Name ~= 'a' then v.Material = 'Metal' end end
  1153. end
  1154.  
  1155. --------MAKING--------------------
  1156. h1 = T.P(1.5,1.5,1.5,'Black',0,false,false)
  1157. h1.Material = "Foil"
  1158. T.FM(h1,'sphere',1,1,1)
  1159. T.W(h1,char.Head,0,0,0,0,0,0)
  1160.  
  1161. e1 = T.P(.5,.5,.5,'Black',0,false,false) T.FM(e1,'sphere',1,1,1)
  1162. e1.Material = "Foil"
  1163. e2 = T.P(.5,.5,.5,'Black',0,false,false) T.FM(e2,'sphere',1,1,1)
  1164. e2.Material = "Foil"
  1165. e1w=T.W(e1,h1,.35,0,-.55,0,0,0) T.W(e2,h1,-.35,0,-.55,0,0,0)
  1166. e1w.Material = "Foil"
  1167.  
  1168. dec = Instance.new("Decal")
  1169. dec.Face = 'Front'
  1170. dec.Texture = "http://www.roblox.com/asset/?id=0"
  1171.  
  1172.  
  1173.  
  1174. char.Head.Transparency = 1
  1175. -----------------------------------
  1176.  
  1177. function colorslide(obj,prop,scol,ecol,timme,override)
  1178. if scol == 'cur' then scol3 = obj.BrickColor.Color else
  1179. scol3 = BrickColor.new(scol).Color
  1180. end
  1181. ecol3 = BrickColor.new(ecol).Color
  1182.  
  1183. for i = 0,1,timme do
  1184. wait()
  1185. pos = v3n(scol3.r,scol3.g,scol3.b):Lerp(v3n(ecol3.r,ecol3.g,ecol3.b),i)
  1186. obj[prop] = Color3.new(pos.x,pos.y,pos.z)
  1187. end
  1188.  
  1189. end
  1190.  
  1191. function checkplayers(pos,radius,what)
  1192. tab = {}
  1193. for i,v in pairs(Workspace:GetChildren()) do
  1194. if v:IsA("Model") and v ~= char then
  1195. for _,q in pairs(v:GetChildren()) do
  1196. if q:IsA("Humanoid") then
  1197. if (q.Torso.Position-pos).magnitude <= radius then
  1198. if what == 'char' then table.insert(tab,q.Parent)
  1199. elseif what == 'humanoid' then table.insert(tab,q)
  1200. end
  1201. end end end end end
  1202. return tab
  1203. end
  1204.  
  1205. function rage()
  1206. tyu = cfn(0,.2,-.5)
  1207. lock.R(1) lock.L(1)
  1208. neck.C0 = normposn
  1209. for i = 0,140,10 do
  1210. wait()
  1211. rw.C1 = (normposr*tyu)*ang(M.D(i),0,M.D(i/(140/-50)))
  1212. lw.C1 = (normposl*tyu)*ang(M.D(i),0,M.D(i/(140/50)))
  1213. neck.C0 = normposn*ang(M.D(i/(140/30)),0,0)
  1214. end
  1215.  
  1216. wait(1)
  1217.  
  1218. for i = 140,50,-20 do
  1219. wait()
  1220. rw.C1 = (normposr)*ang(M.D(-i),0,M.D(i))
  1221. lw.C1 = (normposl)*ang(M.D(-i),0,M.D(-i))
  1222. end
  1223. neck.C0 = normposn*ang(M.D(-30),0,0)
  1224.  
  1225. fire = T.F(torso,30,30,'Shamrock','Black')
  1226.  
  1227. ef = T.P(1,1,1,'Black',0,false,false)
  1228. ew = T.W(ef,torso,0,0,0,0,0,0,ef)
  1229. msh = T.FM(ef,'sphere',1,1,1)
  1230. for i = 0,20 do wait() ef.Transparency = i/20 msh.Scale = v3n(i,i,i)
  1231. T.C(function()
  1232. tabb = checkplayers(ef.Position,20,'char')
  1233. if #tabb > 0 then
  1234. for i,v in pairs(tabb) do damage(v,10,true,.2) end
  1235. end
  1236. end)
  1237. end
  1238. msh:Remove()
  1239.  
  1240. for i = 30,8,-1 do
  1241. wait() fire.Size = i
  1242. end
  1243. colorslide(fire,'Color','Black','Blue',.05)
  1244.  
  1245. lock.R(0) lock.L(0) neck.C0 = normposn
  1246.  
  1247. end
  1248.  
  1249. hop = Instance.new("HopperBin",ply.Backpack)
  1250. hop.Name = name
  1251.  
  1252. holdpos = normposr*ang(math.pi/2,0,0)
  1253. port,port2,bol,boltime = nil,nil,false,1
  1254.  
  1255. function hide()
  1256. if char.Parent ~= curcam then
  1257. char.Parent = curcam
  1258. hop.Name = name..'(h)'
  1259. else char.Parent = Workspace
  1260. hop.Name = name
  1261. end
  1262. end
  1263.  
  1264. function makeport1()
  1265. if not port then --- Blue portal
  1266. circle()
  1267. port = Instance.new("Model",Workspace)
  1268. port.Name = 'omakotikullankallis'
  1269. ring = T.P(1,1,1,'Deep blue',0,false,true,port) T.FM(ring,'ring',4,4,1)
  1270. ring.CFrame = torso.CFrame * cfn(0,0,-4)
  1271. mir = T.P(3.5,.1,3.5,ring.BrickColor.Name,.5,false,true,port) T.FM(mir,'cylinder',1,1,1)
  1272. mir.CFrame = ring.CFrame*ang(math.pi/2,0,0)
  1273. mir.Touched:connect(function(hit) local hum = hit.Parent:FindFirstChild("Humanoid")
  1274. if hum ~= nil and hum.Parent == char and port2 and not bol then bol = true
  1275. hit.Parent:MoveTo(mir2.Position) wait(boltime) bol = false
  1276. end end) ---- On touch event for blue portal
  1277.  
  1278. elseif port then ring.CFrame = torso.CFrame * cfn(0,0,-4)
  1279. mir.CFrame = ring.CFrame*ang(math.pi/2,0,0)
  1280.  
  1281. end
  1282. end
  1283.  
  1284. function makeport2()
  1285. if not port2 then
  1286. circle()
  1287. port2 = Instance.new("Model",Workspace)
  1288. port2.Name = 'omakotikullankallis'
  1289. ring2 = T.P(1,1,1,'Foil orange',0,false,true,port2) T.FM(ring2,'ring',4,4,1)
  1290. ring2.CFrame = torso.CFrame * cfn(0,0,-4)
  1291. mir2 = T.P(3.5,.1,3.5,ring2.BrickColor.Name,.5,false,true,port2) T.FM(mir2,'cylinder',1,1,1)
  1292. mir2.CFrame = ring2.CFrame*ang(math.pi/2,0,0)
  1293.  
  1294. mir2.Touched:connect(function(hit) local hum = hit.Parent:FindFirstChild("Humanoid")
  1295. if hum ~= nil and hum.Parent == char and port and not bol then bol = true
  1296. hit.Parent:MoveTo(mir.Position) wait(boltime) bol = false
  1297. end end) ---- On touch event for orange portal
  1298.  
  1299. elseif port2 then ring2.CFrame = torso.CFrame * cfn(0,0,-4)
  1300. mir2.CFrame = ring2.CFrame*ang(math.pi/2,0,0)
  1301. end
  1302. end
  1303. holdpos2 = normposl*ang(math.pi/2,0,0)
  1304. function punch()
  1305. fires = {}
  1306. lock.R(1) lock.L(1)
  1307. for i,v in pairs(bracs:children()) do
  1308. if v.Name ~= 'a' then table.insert(fires,T.F(v,.5,.5,'Black','Black')) end
  1309. end
  1310. sticks = Instance.new("Model",m)
  1311.  
  1312. rr = .5
  1313. for _,v in pairs({rarm,larm}) do
  1314. for _,pos in pairs({ {0,-rr}, {0,rr}, {rr,0}, {-rr,0} }) do
  1315. stick = T.P(.3,.3,2.5,'Really blue',.5,false,false,sticks)
  1316. stick.Touched:connect(function(hit) damage(hit.Parent,10000,true,.05) end)
  1317. T.W(stick,v,pos[1],-.6,pos[2],-math.pi/2,0,0)
  1318. end end
  1319. for i = 1,10 do
  1320. rw.C1 = holdpos*cfn(0,.5,0)
  1321. lw.C1 = (holdpos2*cfn(0,-.5,0))*ang(0,0,M.D(30))
  1322. wait(.05)
  1323. rw.C1 = (holdpos*cfn(0,-.5,0))*ang(0,0,M.D(-30))
  1324. lw.C1 = holdpos2*cfn(0,.5,0)
  1325. wait(.05)
  1326. end
  1327. sticks:Remove() for _,v in pairs(fires) do v:Remove() end
  1328. lock.R(0) lock.L(0)
  1329. end
  1330.  
  1331. Workspace.ChildRemoved:connect(function(child)
  1332. if child == port then port = nil
  1333. elseif child == port2 then port2 = nil
  1334. end end)
  1335.  
  1336. function removeports()
  1337. if port then port:Remove() port = nil end
  1338. if port2 then port2:Remove() port2 = nil end
  1339. for i,v in pairs(Workspace:GetChildren()) do if v.Name == 'omakotikullankallis' then v:Remove() end end
  1340. end
  1341.  
  1342. function circle()
  1343. r = .5
  1344. lock.R(1)
  1345. for i = 0,90,10 do wait() rw.C1 = normposr*ang(M.D(i),0,0) end
  1346.  
  1347. for i = 0,360,25 do
  1348. wait()
  1349. rw.C1 = holdpos*ang(M.Cos(M.D(-i))*r,0,M.Sin(M.D(-i))*r)
  1350. end
  1351.  
  1352. for i = 90,0,-10 do wait() rw.C1 = normposr*ang(M.D(i),0,0) end
  1353. lock.R(0)
  1354.  
  1355. end
  1356. Workspace.ChildRemoved:connect(function(child) if child == port then port = nil elseif child == port2 then port2 = nil end end) --- Nill's portals if they dont exist
  1357.  
  1358. function bowl(mouse)
  1359. colorslide(e1,'Color','cur','Royal purple',.05)
  1360. dec.Parent = e1
  1361. light = T.P(1,2,1,'Royal purple',.8,false,false)
  1362. light.Touched:connect(function(hit) damage(hit.Parent,10000,false,1) end)
  1363. T.FM(light,'spike',.5,2,.5)
  1364. T.W(light,e1,0,0,-1,math.pi/2,0,0)
  1365. holding = true
  1366. posa = e1.Position
  1367. while holding do
  1368. wait()
  1369.  
  1370. lv = char.Head.CFrame.lookVector
  1371. pos3 = ((posa-mouse.hit.p).unit):Cross(lv)
  1372. e1w.C1 = cfn(.35,0,-.55)*ang(0,pos3.Y,0)
  1373. end
  1374. light:Remove()
  1375. colorslide(e1,'Color','cur','Really black',.05) e1w.C1 = cfn(.35,0,-.55)
  1376. dec.Parent = nil
  1377. end
  1378.  
  1379. sitbp = nil
  1380. function sit()
  1381. if sitbp == nil then
  1382. lock.R(2) lock.L(2)
  1383. sitbp = T.BP(torso,torso.Position)
  1384. for i = 1,90,5 do
  1385. wait()
  1386. rhw.C1 = normposr2*ang(M.D(i),0,M.D(i/(90/-30)))
  1387. lhw.C1 = normposl2*ang(M.D(i),0,M.D(i/(90/30)))
  1388. sitbp.position = torso.Position - v3n(0,i/(90),0)
  1389. end
  1390. elseif sitbp ~= nil then
  1391. for i = 90,1,-5 do
  1392. wait()
  1393. rhw.C1 = normposr2*ang(M.D(i),0,M.D(i/(90/-30)))
  1394. lhw.C1 = normposl2*ang(M.D(i),0,M.D(i/(90/30)))
  1395. sitbp.position = torso.Position + v3n(0,i/(90),0)
  1396. end
  1397. lock.R(-1) lock.L(-1)
  1398. sitbp:Remove() sitbp = nil
  1399. end
  1400. end
  1401.  
  1402. function freemyself()
  1403. for i,v in pairs(char:GetChildren()) do
  1404. for _,o in pairs(v:GetChildren()) do
  1405. for _,q in pairs({'BodyPosition','BodyForce','BodyVelocity','BodyGyro'}) do
  1406. if o:IsA(q) then o:Remove() end
  1407. end
  1408. if o:IsA("Part") then
  1409. o.Anchored = false end
  1410. end
  1411. end
  1412. sk = T.P(1,1,1,'Royal Purple',0,false,false)
  1413. T.W(sk,torso,0,0,0,0,0,0,sk)
  1414. msh = T.FM(sk,'skull',3,3,3)
  1415. for i = 0,1,.05 do wait() sk.Transparency = i end sk:Remove()
  1416. end
  1417.  
  1418. function breake()
  1419. welds = {}
  1420. bps = {}
  1421. possa = torso.Position
  1422. for i,v in pairs(torso:children()) do
  1423. if v:IsA("Motor6D") then table.insert(welds,v) v.Parent = nil
  1424. end
  1425. end
  1426.  
  1427. for _,v in pairs(char:children()) do
  1428. if v:IsA("BasePart") then v.CanCollide = true end
  1429. end
  1430.  
  1431. local hum = char.Humanoid
  1432. hum.Parent = nil
  1433.  
  1434. holding = true
  1435.  
  1436. while holding do wait() end
  1437.  
  1438. for i,v in pairs(welds) do
  1439. v.Parent = torso
  1440. v.Part1 = v.Part1
  1441. end
  1442. hum.Parent = char
  1443. end
  1444.  
  1445. klist = {
  1446. {'fa',function() rage() end},
  1447. {'qa',function() makeport1() end},
  1448. {'ea',function() makeport2() end},
  1449. {'ra',function() removeports() end},
  1450. {'ca',function(a) punch(a) end},
  1451. {'xa',function() sit() end},
  1452. {'za',function() freemyself() end},
  1453. {'va',function() hide() end},
  1454. {'ga',function() breake() end,''}
  1455. }
  1456.  
  1457. hop.Deselected:connect(function() lock.R(0) lock.L(0) end)
  1458. hop.Selected:connect(function(mouse)
  1459. mouse.Button1Up:connect(function() holding = false end)
  1460. mouse.KeyUp:connect(function(a) for i,v in pairs(klist) do if a == v[1] and v[3] ~= nil then holding = false end end end)
  1461. mouse.KeyDown:connect(function(key) if attacking then return end
  1462. for i,v in pairs(klist) do
  1463. if key == v[1] then attacking = true v[2](mouse) attacking = false end
  1464. end
  1465. end)
  1466.  
  1467. mouse.Button1Down:connect(function() if attacking then return end attacking = true bowl(mouse) attacking = false end)
  1468. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement