Advertisement
JORGEEEEEE_EEE

old shit

Aug 18th, 2019
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.70 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Please run as a server script. Use h/ instead of hl/.") end
  2. print("FE Compatibility: by WaverlyCole & Mokiros")
  3. InternalData = {}
  4. do
  5. script.Parent = owner.Character
  6. local Event = Instance.new("RemoteEvent")
  7. Event.Name = "UserInput"
  8. local function NewFakeEvent()
  9. local Fake = {fakeEvent=true,Connect=function(self,Func)self.Function=Func end}Fake.connect = Fake.Connect
  10. return Fake
  11. end
  12. local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
  13. local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
  14. local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
  15. self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
  16. end};ContextActionService.UnBindAction = ContextActionService.BindAction
  17. local function TriggerEvent(self,Event,...)
  18. local Trigger = Mouse[Event]
  19. if Trigger and Trigger.fakeEvent and Trigger.Function then
  20. Trigger.Function(...)
  21. end
  22. end
  23. Mouse.TrigEvent = TriggerEvent
  24. UserInputService.TrigEvent = TriggerEvent
  25. Event.OnServerEvent:Connect(function(FiredBy,Input)
  26. if FiredBy.Name ~= owner.Name then end
  27. if Input.MouseEvent then
  28. Mouse.Target = Input.Target
  29. Mouse.Hit = Input.Hit
  30. else
  31. local Begin = Input.UserInputState == Enum.UserInputState.Begin
  32. if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  33. return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up")
  34. end
  35. for _,Action in pairs(ContextActionService.Actions) do
  36. for _,Key in pairs(Action.Keys) do
  37. if Key==Input.KeyCode then
  38. Action.Function(Action.Name,Input.UserInputState,Input)
  39. end
  40. end
  41. end
  42. Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
  43. UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
  44. end
  45. end)
  46. InternalData["Mouse"] = Mouse
  47. InternalData["ContextActionService"] = ContextActionService
  48. InternalData["UserInputService"] = UserInputService
  49. Event.Parent = NLS([[
  50. local Player = owner
  51. local Event = script:WaitForChild("UserInput")
  52. local UserInputService = game:GetService("UserInputService")
  53. local Mouse = Player:GetMouse()
  54. local Input = function(Input,gameProcessedEvent)
  55. if gameProcessedEvent then return end
  56. Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
  57. end
  58. UserInputService.InputBegan:Connect(Input)
  59. UserInputService.InputEnded:Connect(Input)
  60. local Hit,Target
  61. while wait(1/30) do
  62. if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
  63. Hit,Target = Mouse.Hit,Mouse.Target
  64. Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
  65. end
  66. end
  67. ]],owner.Character)
  68. end
  69. RealGame = game;game = setmetatable({},{
  70. __index = function (self,Index)
  71. local Sandbox = function (Thing)
  72. if Thing:IsA("Player") then
  73. local RealPlayer = Thing
  74. return setmetatable({},{
  75. __index = function (self,Index)
  76. local Type = type(RealPlayer[Index])
  77. if Type == "function" then
  78. if Index:lower() == "getmouse" or Index:lower() == "mouse" then
  79. return function (self)
  80. return InternalData["Mouse"]
  81. end
  82. end
  83. return function (self,...)
  84. return RealPlayer[Index](RealPlayer,...)
  85. end
  86. else
  87. return RealPlayer[Index]
  88. end
  89. end;
  90. __tostring = function(self)
  91. return RealPlayer.Name
  92. end
  93. })
  94. end
  95. end
  96. if RealGame[Index] then
  97. local Type = type(RealGame[Index])
  98. if Type == "function" then
  99. if Index:lower() == "getservice" or Index:lower() == "service" then
  100. return function (self,Service)
  101. if Service:lower() == "players" then
  102. return setmetatable({},{
  103. __index = function (self2,Index2)
  104. local RealService = RealGame:GetService(Service)
  105. local Type2 = type(Index2)
  106. if Type2 == "function" then
  107. return function (self,...)
  108. return RealService[Index2](RealService,...)
  109. end
  110. else
  111. if Index2:lower() == "localplayer" then
  112. return Sandbox(owner)
  113. end
  114. return RealService[Index2]
  115. end
  116. end;
  117. __tostring = function(self)
  118. return RealGame:GetService(Service).Name
  119. end
  120. })
  121. elseif Service:lower() == "contextactionservice" then
  122. return InternalData["ContextActionService"]
  123. elseif Service:lower() == "contextactionservice" then
  124. return InternalData["UserInputService"]
  125. elseif Service:lower() == "runservice" then
  126. return setmetatable({},{
  127. __index = function(self2,Index2)
  128. local RealService = RealGame:GetService(Service)
  129. local Type2 = type(Index2)
  130. if Type2 == "function" then
  131. return function (self,...)
  132. return RealService[Index2](RealService,...)
  133. end
  134. else
  135. if Index2:lower() == "bindtorenderstep" then
  136. return function (self,Name,Priority,Function)
  137. return RealGame:GetService("RunService").Stepped:Connect(Function)
  138. end
  139. end
  140. if Index2:lower() == "renderstepped" then
  141. return RealService["Stepped"]
  142. end
  143. return RealService[Index2]
  144. end
  145. end
  146. })
  147. else
  148. return RealGame:GetService(Service)
  149. end
  150. end
  151. end
  152. return function (self,...)
  153. return RealGame[Index](RealGame,...)
  154. end
  155. else
  156. if game:GetService(Index) then
  157. return game:GetService(Index)
  158. end
  159. return RealGame[Index]
  160. end
  161. else
  162. return nil
  163. end
  164. end
  165. });Game = game;owner = game:GetService("Players").LocalPlayer
  166. print("Complete! Running...")
  167.  
  168. ply = game.Players.LocalPlayer
  169. char = ply.Character
  170. torso = char.Torso
  171. attacking = false
  172. track = false
  173. curcam = Workspace.CurrentCamera
  174. name = 'KFM'
  175.  
  176. pcall(function() char:FindFirstChild("legetony"):Remove() char:FindFirstChild("Belt"):Remove() end)
  177. m = Instance.new("Model",char) m.Name = "legetony"
  178.  
  179. cfn,ang = CFrame.new,CFrame.Angles
  180. v3n = Vector3.new
  181.  
  182. rs = torso["Right Shoulder"]
  183. ls = torso["Left Shoulder"]
  184. rh = torso["Right Hip"]
  185. lh = torso["Right Hip"]
  186. neck = torso["Neck"]
  187. rw,lw = nil,nil
  188. rhw,lhw = nil,nil
  189. local orgc1 = rs.C1
  190.  
  191. rarm = char["Right Arm"]
  192. larm = char["Left Arm"]
  193. rleg = char["Right Leg"]
  194. lleg = char["Left Leg"]
  195.  
  196. normposr = cfn(1.5,.5,0)
  197. normposl = cfn(-1.5,.5,0)
  198. normposr2 = cfn(-.5,-1.5,0)
  199. normposl2 = cfn(.5,-1.5,0)
  200. normposn = CFrame.new(0,1,0,-1,-0,-0,0,0,1,0,1,0)
  201.  
  202. holdpos = normposr*ang(math.pi/2,0,0)
  203. holdpos2 = normposl*ang(math.pi/2,0,0)
  204.  
  205. lock = {["R"] =
  206. function(a)
  207. if a == 1 then
  208. rabrick = T.P(1,1,1,"White",1,false,false)
  209. rw = T.W(rabrick,torso,1.5,.5,0,0,0,0)
  210. T.W(rarm,rabrick,0,-.5,0,0,0,0)
  211. elseif a == 2 then
  212. rlbrick = T.P(1,1,1,"White",1,false,false)
  213. rhw = T.W(rlbrick,torso,-.5,-1.5,0,0,0,0)
  214. T.W(rleg,rlbrick,0,-.5,0,0,0,0)
  215. elseif a == 0 then
  216. rs.Parent = torso
  217. rw.Parent = nil
  218. rabrick:Destroy() rabrick = nil
  219. elseif a == -1 then
  220. rhw.Parent = nil
  221. rh.Parent = torso
  222. rlbrick:Destroy() rlbrick = nil
  223. end
  224. end
  225. , ["L"] = function(a)
  226. if a == 1 then
  227. labrick = T.P(1,1,1,"White",1,false,false)
  228. lw = T.W(labrick,torso,-1.5,.5,0,0,0,0)
  229. T.W(larm,labrick,0,-.5,0,0,0,0)
  230. elseif a == 2 then
  231. llbrick = T.P(1,1,1,"White",1,false,false)
  232. lhw = T.W(llbrick,torso,.5,-1.5,0,0,0,0)
  233. T.W(lleg,llbrick,0,-.5,0,0,0,0)
  234. elseif a == 0 then
  235. ls.Parent = torso
  236. lw.Parent = nil
  237. labrick:Destroy() labrick = nil
  238. elseif a == -1 then
  239. lhw.Parent = nil
  240. lh.Parent = torso
  241. llbrick:Destroy() llbrick = nil
  242. end
  243. end}
  244.  
  245. ------TOOOOOLS------
  246. T = {["P"] = function(x,y,z,color,transparency,cancollide,anchored,parent,typee)
  247. if typee ~= nil then
  248. c = Instance.new("WedgePart",m)
  249. else
  250. c = Instance.new("Part",m)
  251. end
  252. c.TopSurface,c.BottomSurface = 0,0
  253. c.formFactor = "Custom"
  254. c.Size = Vector3.new(x,y,z)
  255. if color ~= "random" then
  256. c.BrickColor = BrickColor.new(color)
  257. else c.BrickColor = BrickColor:random() end
  258. c.Transparency = transparency
  259. c.CanCollide = cancollide
  260. if anchored ~= nil then c.Anchored = anchored end
  261. if parent ~= nil then c.Parent = parent end
  262. return c
  263.  
  264. end
  265. ,
  266. ["C"] = function(func) coroutine.resume(coroutine.create(func)) end
  267. ,
  268. ["W"] = function(part0,part1,x,y,z,rx,ry,rz,parent)
  269. w = Instance.new("Motor",m)
  270. if parent ~= nil then w.Parent = parent end
  271. w.Part0,w.Part1 = part0,part1
  272. w.C1 = CFrame.new(x,y,z) * CFrame.Angles(rx,ry,rz)
  273. return w
  274. end
  275. ,
  276. ["BG"] = function(parent)
  277. local c = Instance.new("BodyGyro",parent)
  278. c.P = 20e+003
  279. c.cframe = parent.CFrame
  280. c.maxTorque = Vector3.new(c.P,c.P,c.P)
  281. return c
  282. end
  283. ,
  284. ["BP"] = function(parent,position)
  285. local bp = Instance.new("BodyPosition",parent)
  286. bp.maxForce = Vector3.new()*math.huge
  287. bp.position = position
  288. return bp
  289. end
  290. ,
  291. ["F"] = function(parent,size,heat,color,secondcolor,enabled)
  292. f = Instance.new("Fire",parent)
  293. f.Size = size
  294. f.Heat = heat
  295. if enabled ~= nil then f.Enabled = enabled end
  296. if color ~= nil then f.Color = BrickColor.new(color).Color end
  297. if secondcolor ~= nil then f.SecondaryColor = BrickColor.new(secondcolor).Color end
  298. return f
  299. end
  300. ,
  301. ["FM"] = function(parent,meshid,x,y,z,meshtexture)
  302. if meshid == "cylinder" then
  303. mesh = Instance.new("CylinderMesh",parent)
  304. mesh.Scale = Vector3.new(x,y,z)
  305. return mesh
  306. else
  307. mesh = Instance.new("SpecialMesh",parent)
  308.  
  309. if meshid ~= "sphere" then
  310. if type(meshid) == "number" then mesh.MeshId = "rbxassetid://"..meshid else
  311. mesh.MeshId = "rbxassetid://"..meshids[meshid]
  312. end
  313.  
  314. else mesh.MeshType = 3 end
  315.  
  316. mesh.Scale = Vector3.new(x,y,z)
  317.  
  318. if meshtexture ~= nil then
  319. if type(meshtexture) == "number" then mesh.TextureId = "rbxassetid://"..meshtexture else
  320. mesh.TextureId = "rbxassetid://"..textureids[meshtexture] end
  321.  
  322. end
  323.  
  324. return mesh
  325. end
  326. end
  327. ,
  328. ["Track"] = function(obj,s,t,lt,color,fade)
  329. coroutine.resume(coroutine.create(function()
  330. while track do
  331. old = obj.Position
  332. wait()
  333. new = obj.Position
  334.  
  335. mag = (old-new).magnitude
  336. dist = (old+new)/2
  337.  
  338. local ray = T.P(s,mag+.2,s,obj.Color,t,false,true)
  339. Instance.new("CylinderMesh",ray)
  340. ray.CFrame = CFrame.new(dist,old)*ang(math.pi/2,0,0)
  341. if fade ~= nil then
  342. delay(lt,function()
  343. for i = t,1,fade do wait() ray.Transparency = i end ray:Remove() end)
  344. else
  345. game:GetService("Debris"):AddItem(ray,lt)
  346. end
  347. if color ~= nil then ray.BrickColor = BrickColor.new(color) end
  348.  
  349. end
  350. end)) end
  351. }
  352. --------------------------------------------------
  353. ----------------DAMAGE FUNCTION--------------------
  354. function damage(hit,amount,show,del,poikkeus)
  355. for i,v in pairs(hit:GetChildren()) do
  356. if v:IsA("Humanoid") and v.Parent ~= char then
  357.  
  358. amo = 0
  359. function showa(p)
  360. if show == true then
  361. for i,o in pairs(p:GetChildren()) do
  362. if o:IsA("BillboardGui") and o.Name == "satuttava" then
  363. amo = amo+1
  364. end end
  365.  
  366.  
  367. local bbg = Instance.new("BillboardGui",p)
  368. bbg.Adornee = p.Torso
  369. bbg.Name = "satuttava"
  370. bbg.Size = UDim2.new(2,0,2,0)
  371. bbg.StudsOffset = Vector3.new(0,6+amo*2,0)
  372.  
  373. local box = Instance.new("TextLabel",bbg)
  374. box.Size = UDim2.new(1,0,1,0)
  375. box.BackgroundColor = BrickColor.new("White")
  376. box.Text = amount
  377. box.BackgroundTransparency = .5
  378. if amount == 0 then box.Text = "K.O" end
  379. box.Position = UDim2.new(0,0,0,0)
  380. box.TextScaled = true
  381. game:GetService("Debris"):AddItem(bbg,.5)
  382. end
  383. end
  384.  
  385. function dame(q)
  386. if poikkeus ~= nil then
  387. for _,u in pairs(poikkeus) do
  388. if q.Parent.Name ~= u then
  389. showa(q)
  390. if amount == 0 then q.Parent:BreakJoints() end
  391. q.Health = q.Health - amount
  392. end
  393. end
  394. elseif poikkeus == nil then
  395. if amount == 0 then q.Parent:BreakJoints() end
  396. q.Health = q.Health - amount
  397. showa(q)
  398. end
  399. end
  400.  
  401. if del ~= nil then
  402. local find = v.Parent:FindFirstChild("hitted")
  403. if find == nil then
  404. dame(v)
  405. val = Instance.new("BoolValue",v.Parent)val.Name="hitted"
  406. game:GetService("Debris"):AddItem(val,del)
  407. end
  408. elseif del == nil then
  409. dame(v)
  410.  
  411. end
  412.  
  413. end
  414. end
  415. end
  416. -----------------------------------------------------------------
  417.  
  418. ------MESHIDS---
  419. meshids = {["penguin"] = 15853464, ["ring"] = 3270017,
  420. ["spike"] = 1033714,["cone"] = 1082802,["crown"] = 20329976,["crossbow"] = 15886761,
  421. ["cloud"] = 1095708,["mjolnir"] = 1279013,["diamond"] = 9756362, ["hand"] = 37241605,
  422. ["fist"] = 65322375,["skull"] = 36869983,["totem"] = 35624068,["spikeb"] = 9982590,["dragon"] = 58430372,["fish"] = 31221717, ["coffee"] = 15929962,["spiral"] = 1051557,
  423. ["ramen"] = 19380188}---some meshids
  424. textureids = {["cone"] = 1082804,["rainbow"] = 28488599,["fish"] = 31221733, ["coffee"] = 24181455,["monster"] = 33366441,["ramen"] = 19380153}
  425. -----------------
  426.  
  427. ---MATH SHORTENINGS---
  428. M = {["R"] = function(a,b) return math.random(a,b) end,
  429. ["Cos"] = function(a) return math.cos(a) end,
  430. ["Sin"] = function(a) return math.sin(a) end,
  431. ["D"] = function(a) return math.rad(a) end
  432. }
  433.  
  434. for i,v in pairs(char:GetChildren()) do
  435. if v:IsA("Clothing") or v:IsA("Hat") then v:Remove()
  436. end end
  437.  
  438. col = char:FindFirstChild("Body Colors")
  439. if col == nil then col = Instance.new("BodyColors",char) end
  440. collist = {
  441. {'LeftLegColor',"Deep blue"},
  442. {'RightLegColor',"Deep blue"},
  443. {'TorsoColor',"Cool yellow"},
  444. {'LeftArmColor',"Cool yellow"},
  445. {'RightArmColor',"Cool yellow"},
  446. }
  447. for i,v in pairs(collist) do
  448. col[v[1]] = BrickColor.new(v[2])
  449. end
  450.  
  451. bracs = Instance.new("Model",m)
  452. for i,v in pairs({rarm,larm}) do
  453. b1 = T.P(1.1,.3,1.1,'Brown',0,false,false,bracs)
  454. b1.Material = 'DiamondPlate' b1.Name = 'a'
  455. T.W(b1,v,0,-.5,0,0,0,0)
  456. p = T.P(.3,.4,.3,'Cyan',0,false,false,bracs) T.W(p,b1,0,0,.55,0,0,0)
  457. p = T.P(.3,.4,.3,'Cyan',0,false,false,bracs) T.W(p,b1,0,0,-.55,0,0,0)
  458. p = T.P(.3,.4,.3,'Cyan',0,false,false,bracs) T.W(p,b1,.55,0,0,0,math.pi/2,0)
  459. p = T.P(.3,.4,.3,'Cyan',0,false,false,bracs) T.W(p,b1,-.55,0,0,0,math.pi/2,0)
  460. for i,v in pairs(bracs:children()) do if v.Name ~= 'a' then v.Material = 'Ice' end end
  461. end
  462.  
  463. --------MAKING--------------------
  464. h1 = T.P(1.5,1.5,1.5,'Cool yellow',0,false,false)
  465. T.FM(h1,'sphere',1,1,1)
  466. T.W(h1,char.Head,0,0,0,0,0,0)
  467.  
  468. e1 = T.P(.5,.5,.5,'White',0,false,false) T.FM(e1,'sphere',1,1,1)
  469. e2 = T.P(.5,.5,.5,'White',0,false,false) T.FM(e2,'sphere',1,1,1)
  470. e1w=T.W(e1,h1,.35,0,-.55,0,0,0) T.W(e2,h1,-.35,0,-.55,0,0,0)
  471.  
  472. dec = Instance.new("Decal")
  473. dec.Face = 'Front'
  474. dec.Texture = "http://www.roblox.com/asset/?id=58535182"
  475.  
  476. b2 = T.P(2.1,.5,1.1,'White',0,false,false)
  477. T.W(b2,torso,0,-1,0,0,0,0)
  478.  
  479. char.Head.Transparency = 1
  480. -----------------------------------
  481.  
  482. function colorslide(obj,prop,scol,ecol,timme,override)
  483. if scol == 'cur' then scol3 = obj.BrickColor.Color else
  484. scol3 = BrickColor.new(scol).Color
  485. end
  486. ecol3 = BrickColor.new(ecol).Color
  487.  
  488. for i = 0,1,timme do
  489. wait()
  490. pos = v3n(scol3.r,scol3.g,scol3.b):Lerp(v3n(ecol3.r,ecol3.g,ecol3.b),i)
  491. obj[prop] = Color3.new(pos.x,pos.y,pos.z)
  492. end
  493.  
  494. end
  495.  
  496. function checkplayers(pos,radius,what)
  497. tab = {}
  498. for i,v in pairs(Workspace:GetChildren()) do
  499. if v:IsA("Model") and v ~= char then
  500. for _,q in pairs(v:GetChildren()) do
  501. if q:IsA("Humanoid") then
  502. if (q.Torso.Position-pos).magnitude <= radius then
  503. if what == 'char' then table.insert(tab,q.Parent)
  504. elseif what == 'humanoid' then table.insert(tab,q)
  505. end
  506. end end end end end
  507. return tab
  508. end
  509.  
  510. function rage()
  511. tyu = cfn(0,.2,-.5)
  512. lock.R(1) lock.L(1)
  513. neck.C0 = normposn
  514. for i = 0,140,10 do
  515. wait()
  516. rw.C1 = (normposr*tyu)*ang(M.D(i),0,M.D(i/(140/-50)))
  517. lw.C1 = (normposl*tyu)*ang(M.D(i),0,M.D(i/(140/50)))
  518. neck.C0 = normposn*ang(M.D(i/(140/30)),0,0)
  519. end
  520.  
  521. wait(1)
  522.  
  523. for i = 140,50,-20 do
  524. wait()
  525. rw.C1 = (normposr)*ang(M.D(-i),0,M.D(i))
  526. lw.C1 = (normposl)*ang(M.D(-i),0,M.D(-i))
  527. end
  528. neck.C0 = normposn*ang(M.D(-30),0,0)
  529.  
  530. fire = T.F(torso,30,30,'Bright red','Magenta')
  531.  
  532. ef = T.P(1,1,1,'Black',0,false,false)
  533. ew = T.W(ef,torso,0,0,0,0,0,0,ef)
  534. msh = T.FM(ef,'sphere',1,1,1)
  535. for i = 0,20 do wait() ef.Transparency = i/20 msh.Scale = v3n(i,i,i)
  536. T.C(function()
  537. tabb = checkplayers(ef.Position,20,'char')
  538. if #tabb > 0 then
  539. for i,v in pairs(tabb) do damage(v,10,true,.2) end
  540. end
  541. end)
  542. end
  543. msh:Remove()
  544.  
  545. for i = 30,8,-1 do
  546. wait() fire.Size = i
  547. end
  548. colorslide(fire,'Color','Bright red','Deep blue',.05)
  549.  
  550. lock.R(0) lock.L(0) neck.C0 = normposn
  551.  
  552. end
  553.  
  554. hop = Instance.new("HopperBin",ply.Backpack)
  555. hop.Name = name
  556.  
  557. holdpos = normposr*ang(math.pi/2,0,0)
  558. port,port2,bol,boltime = nil,nil,false,1
  559.  
  560. function hide()
  561. if char.Parent ~= curcam then
  562. char.Parent = curcam
  563. hop.Name = name..'(h)'
  564. else char.Parent = Workspace
  565. hop.Name = name
  566. end
  567. end
  568.  
  569. function makeport1()
  570. if not port then --- Blue portal
  571. circle()
  572. port = Instance.new("Model",Workspace)
  573. port.Name = 'omakotikullankallis'
  574. ring = T.P(1,1,1,'Deep blue',0,false,true,port) T.FM(ring,'ring',4,4,1)
  575. ring.CFrame = torso.CFrame * cfn(0,0,-4)
  576. mir = T.P(3.5,.1,3.5,ring.BrickColor.Name,.5,false,true,port) T.FM(mir,'cylinder',1,1,1)
  577. mir.CFrame = ring.CFrame*ang(math.pi/2,0,0)
  578. mir.Touched:connect(function(hit) local hum = hit.Parent:FindFirstChild("Humanoid")
  579. if hum ~= nil and hum.Parent == char and port2 and not bol then bol = true
  580. hit.Parent:MoveTo(mir2.Position) wait(boltime) bol = false
  581. end end) ---- On touch event for blue portal
  582.  
  583. elseif port then ring.CFrame = torso.CFrame * cfn(0,0,-4)
  584. mir.CFrame = ring.CFrame*ang(math.pi/2,0,0)
  585.  
  586. end
  587. end
  588.  
  589. function makeport2()
  590. if not port2 then
  591. circle()
  592. port2 = Instance.new("Model",Workspace)
  593. port2.Name = 'omakotikullankallis'
  594. ring2 = T.P(1,1,1,'Neon orange',0,false,true,port2) T.FM(ring2,'ring',4,4,1)
  595. ring2.CFrame = torso.CFrame * cfn(0,0,-4)
  596. mir2 = T.P(3.5,.1,3.5,ring2.BrickColor.Name,.5,false,true,port2) T.FM(mir2,'cylinder',1,1,1)
  597. mir2.CFrame = ring2.CFrame*ang(math.pi/2,0,0)
  598.  
  599. mir2.Touched:connect(function(hit) local hum = hit.Parent:FindFirstChild("Humanoid")
  600. if hum ~= nil and hum.Parent == char and port and not bol then bol = true
  601. hit.Parent:MoveTo(mir.Position) wait(boltime) bol = false
  602. end end) ---- On touch event for orange portal
  603.  
  604. elseif port2 then ring2.CFrame = torso.CFrame * cfn(0,0,-4)
  605. mir2.CFrame = ring2.CFrame*ang(math.pi/2,0,0)
  606. end
  607. end
  608. holdpos2 = normposl*ang(math.pi/2,0,0)
  609. function punch()
  610. fires = {}
  611. lock.R(1) lock.L(1)
  612. for i,v in pairs(bracs:children()) do
  613. if v.Name ~= 'a' then table.insert(fires,T.F(v,.5,.5,'Cyan','Black')) end
  614. end
  615. sticks = Instance.new("Model",m)
  616.  
  617. rr = .5
  618. for _,v in pairs({rarm,larm}) do
  619. for _,pos in pairs({ {0,-rr}, {0,rr}, {rr,0}, {-rr,0} }) do
  620. stick = T.P(.3,.3,2.5,'Cyan',.5,false,false,sticks)
  621. stick.Touched:connect(function(hit) damage(hit.Parent,10,true,.05) end)
  622. T.W(stick,v,pos[1],-.6,pos[2],-math.pi/2,0,0)
  623. end end
  624. for i = 1,10 do
  625. rw.C1 = holdpos*cfn(0,.5,0)
  626. lw.C1 = (holdpos2*cfn(0,-.5,0))*ang(0,0,M.D(30))
  627. wait(.05)
  628. rw.C1 = (holdpos*cfn(0,-.5,0))*ang(0,0,M.D(-30))
  629. lw.C1 = holdpos2*cfn(0,.5,0)
  630. wait(.05)
  631. end
  632. sticks:Remove() for _,v in pairs(fires) do v:Remove() end
  633. lock.R(0) lock.L(0)
  634. end
  635.  
  636. Workspace.ChildRemoved:connect(function(child)
  637. if child == port then port = nil
  638. elseif child == port2 then port2 = nil
  639. end end)
  640.  
  641. function removeports()
  642. if port then port:Remove() port = nil end
  643. if port2 then port2:Remove() port2 = nil end
  644. for i,v in pairs(Workspace:GetChildren()) do if v.Name == 'omakotikullankallis' then v:Remove() end end
  645. end
  646.  
  647. function circle()
  648. r = .5
  649. lock.R(1)
  650. for i = 0,90,10 do wait() rw.C1 = normposr*ang(M.D(i),0,0) end
  651.  
  652. for i = 0,360,25 do
  653. wait()
  654. rw.C1 = holdpos*ang(M.Cos(M.D(-i))*r,0,M.Sin(M.D(-i))*r)
  655. end
  656.  
  657. for i = 90,0,-10 do wait() rw.C1 = normposr*ang(M.D(i),0,0) end
  658. lock.R(0)
  659.  
  660. end
  661. 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
  662.  
  663. function bowl(mouse)
  664. colorslide(e1,'Color','cur','Earth green',.05)
  665. dec.Parent = e1
  666. light = T.P(1,2,1,'Earth green',.8,false,false)
  667. light.Touched:connect(function(hit) damage(hit.Parent,80,false,1) end)
  668. T.FM(light,'spike',.5,2,.5)
  669. T.W(light,e1,0,0,-1,math.pi/2,0,0)
  670. holding = true
  671. posa = e1.Position
  672. while holding do
  673. wait()
  674.  
  675. lv = char.Head.CFrame.lookVector
  676. pos3 = ((posa-mouse.hit.p).unit):Cross(lv)
  677. e1w.C1 = cfn(.35,0,-.55)*ang(0,pos3.Y,0)
  678. end
  679. light:Remove()
  680. colorslide(e1,'Color','cur','White',.05) e1w.C1 = cfn(.35,0,-.55)
  681. dec.Parent = nil
  682. end
  683.  
  684. sitbp = nil
  685. function sit()
  686. if sitbp == nil then
  687. lock.R(2) lock.L(2)
  688. sitbp = T.BP(torso,torso.Position)
  689. for i = 1,90,5 do
  690. wait()
  691. rhw.C1 = normposr2*ang(M.D(i),0,M.D(i/(90/-30)))
  692. lhw.C1 = normposl2*ang(M.D(i),0,M.D(i/(90/30)))
  693. sitbp.position = torso.Position - v3n(0,i/(90),0)
  694. end
  695. elseif sitbp ~= nil then
  696. for i = 90,1,-5 do
  697. wait()
  698. rhw.C1 = normposr2*ang(M.D(i),0,M.D(i/(90/-30)))
  699. lhw.C1 = normposl2*ang(M.D(i),0,M.D(i/(90/30)))
  700. sitbp.position = torso.Position + v3n(0,i/(90),0)
  701. end
  702. lock.R(-1) lock.L(-1)
  703. sitbp:Remove() sitbp = nil
  704. end
  705. end
  706.  
  707. function freemyself()
  708. for i,v in pairs(char:GetChildren()) do
  709. for _,o in pairs(v:GetChildren()) do
  710. for _,q in pairs({'BodyPosition','BodyForce','BodyVelocity','BodyGyro'}) do
  711. if o:IsA(q) then o:Remove() end
  712. end
  713. if o:IsA("Part") then
  714. o.Anchored = false end
  715. end
  716. end
  717. sk = T.P(1,1,1,'New Yeller',0,false,false)
  718. T.W(sk,torso,0,0,0,0,0,0,sk)
  719. msh = T.FM(sk,'skull',3,3,3)
  720. for i = 0,1,.05 do wait() sk.Transparency = i end sk:Remove()
  721. end
  722.  
  723. function breake()
  724. welds = {}
  725. bps = {}
  726. possa = torso.Position
  727. for i,v in pairs(torso:children()) do
  728. if v:IsA("Motor6D") then table.insert(welds,v) v.Parent = nil
  729. end
  730. end
  731.  
  732. for _,v in pairs(char:children()) do
  733. if v:IsA("BasePart") then v.CanCollide = true end
  734. end
  735.  
  736. local hum = char.Humanoid
  737. hum.Parent = nil
  738.  
  739. holding = true
  740.  
  741. while holding do wait() end
  742.  
  743. for i,v in pairs(welds) do
  744. v.Parent = torso
  745. v.Part1 = v.Part1
  746. end
  747. hum.Parent = char
  748. end
  749.  
  750. klist = {
  751. {'f',function() rage() end},
  752. {'q',function() makeport1() end},
  753. {'e',function() makeport2() end},
  754. {'r',function() removeports() end},
  755. {'c',function(a) punch(a) end},
  756. {'x',function() sit() end},
  757. {'z',function() freemyself() end},
  758. {'v',function() hide() end},
  759. {'g',function() breake() end,''}
  760. }
  761.  
  762. hop.Deselected:connect(function() lock.R(0) lock.L(0) end)
  763. hop.Selected:connect(function(mouse)
  764. mouse.Button1Up:connect(function() holding = false end)
  765. 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)
  766. mouse.KeyDown:connect(function(key) if attacking then return end
  767. for i,v in pairs(klist) do
  768. if key == v[1] then attacking = true v[2](mouse) attacking = false end
  769. end
  770. end)
  771.  
  772. mouse.Button1Down:connect(function() if attacking then return end attacking = true bowl(mouse) attacking = false end)
  773. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement