Advertisement
JORGEEEEEE_EEE

dd

Aug 18th, 2019
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.85 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. name = 'Cheeseman'
  169. PLAYERS = game:GetService('Players')
  170. ply = PLAYERS.LocalPlayer
  171. char = ply.Character
  172. pcall(function() char:FindFirstChild("legetdg"):Remove() end)
  173. m = Instance.new("Model",char) m.Name = "legetdg"
  174. hop = Instance.new("HopperBin",ply.Backpack)
  175. hop.Name = name
  176. debris = game:GetService("Debris")
  177. cfn,ang,v3n,ud2n,V2 = CFrame.new,CFrame.Angles,Vector3.new,UDim2.new,Vector2.new
  178. floatforce = 196.25
  179. torso,head = char.Torso,char.Head
  180. attacking = false
  181. rs = torso["Right Shoulder"]
  182. ls = torso["Left Shoulder"]
  183. rh = torso["Right Hip"]
  184. lh = torso["Right Hip"]
  185. neck = torso["Neck"]
  186. rw,lw = nil,nil
  187. rhw,lhw = nil,nil
  188. local orgc1 = rs.C1
  189. rarm = char["Right Arm"]
  190. larm = char["Left Arm"]
  191. rleg = char["Right Leg"]
  192. lleg = char["Left Leg"]
  193. normposr = cfn(1.5,.5,0)
  194. normposl = cfn(-1.5,.5,0)
  195. normposl2 = cfn(.5,-1.5,0)
  196. normposr2 = cfn(-.5,-1.5,0)
  197. normposn = CFrame.new(0,1,0,-1,-0,-0,0,0,1,0,1,0)
  198. holdpos = normposr*ang(math.pi/2,0,0)
  199. holdpos2 = normposl*ang(math.pi/2,0,0)
  200. function genNew(ClassName, Parent, Properties)
  201. local nObj = Instance.new(ClassName, Parent)
  202. if Properties["FormFactor"] then
  203. nObj["FormFactor"] = Properties["FormFactor"]
  204. end
  205. for Prop, Value in pairs(Properties) do
  206. nObj[Prop] = Value
  207. end
  208. return nObj
  209. end
  210. T = {["P"] = function(x,y,z,color,transparency,cancollide,anchored,parent,typee)
  211. if typee == 'wedge' then
  212. c = Instance.new("WedgePart",m)
  213. elseif typee == 'seat' then
  214. c = Instance.new("Seat",m)
  215. elseif typee == 'vseat' then
  216. c = Instance.new("VehicleSeat",m)
  217. else
  218. c = Instance.new("Part",m)
  219. end
  220. c.TopSurface,c.BottomSurface = 0,0
  221. c.Locked = true
  222. c.formFactor = "Custom"
  223. c.Size = Vector3.new(x,y,z)
  224. if color ~= "random" then
  225. c.BrickColor = BrickColor.new(color)
  226. else c.BrickColor = BrickColor:random()
  227. end
  228. c.Transparency = transparency
  229. c.CanCollide = cancollide
  230. if anchored ~= nil then c.Anchored = anchored end
  231. if parent ~= nil then c.Parent = parent end
  232. return c
  233. end
  234. ,
  235. ["C"] = function(func) coroutine.resume(coroutine.create(func)) end
  236. ,
  237. ["W"] = function(part0,part1,x,y,z,rx,ry,rz,parent)
  238. w = Instance.new("Motor",m)
  239. if parent ~= nil then w.Parent = parent end
  240. w.Part0,w.Part1 = part0,part1
  241. w.C1 = CFrame.new(x,y,z) * CFrame.Angles(rx,ry,rz)
  242. return w
  243. end
  244. ,
  245. ["BG"] = function(parent)
  246. local c = Instance.new("BodyGyro",parent)
  247. c.P = 20e+003
  248. c.cframe = parent.CFrame
  249. c.maxTorque = Vector3.new(c.P,c.P,c.P)
  250. return c
  251. end
  252. ,
  253. ["BP"] = function(parent,position)
  254. local bp = Instance.new("BodyPosition",parent)
  255. bp.maxForce = Vector3.new()*math.huge
  256. bp.position = position
  257. return bp
  258. end
  259. ,
  260. ["F"] = function(parent,size,heat,color,secondcolor,enabled)
  261. f = Instance.new("Fire",parent)
  262. f.Size = size
  263. f.Heat = heat
  264. if enabled ~= nil then f.Enabled = enabled end
  265. if color ~= nil then f.Color = BrickColor.new(color).Color end
  266. if secondcolor ~= nil then f.SecondaryColor = BrickColor.new(secondcolor).Color end
  267. return f
  268. end
  269. ,
  270. ["FM"] = function(parent,meshid,x,y,z,meshtexture)
  271. if meshid == "cylinder" then
  272. mesh = Instance.new("CylinderMesh",parent)
  273. mesh.Scale = Vector3.new(x,y,z)
  274. return mesh
  275. elseif meshid == 'block' then
  276. mesh = Instance.new("BlockMesh",parent)
  277. mesh.Scale = Vector3.new(x,y,z)
  278. return mesh
  279. end
  280. mesh = Instance.new("SpecialMesh",parent)
  281. if meshid == 'wedge' then
  282. mesh.MeshType = 'Wedge'
  283. elseif meshid == 'sphere' then
  284. mesh.MeshType = 3
  285. elseif type(meshid) == "number" then
  286. mesh.MeshId = "rbxassetid://"..meshid
  287. else
  288. mesh.MeshId = "rbxassetid://"..meshids[meshid]
  289. end
  290. mesh.Scale = Vector3.new(x,y,z)
  291. if meshtexture then
  292. if type(meshtexture) == "number" then mesh.TextureId = "rbxassetid://"..meshtexture else
  293. mesh.TextureId = "rbxassetid://"..textureids[meshtexture] end
  294. end
  295. return mesh
  296. end,
  297. ["Dec"] = function(parent,face,id,transparency)
  298. c = Instance.new("Decal",parent)
  299. c.Face = face
  300. c.Texture = id
  301. if transparency then c.Transparency = transparency end
  302. return c
  303. end,
  304. ["S"] = function(id,pitch,volume,parent)
  305. cur = nil
  306. found = false
  307. if type(id) == 'string' then
  308. for i,v in pairs(char.Head:children()) do
  309. if v:IsA("Sound") and v.Name == id and not found then
  310. cur = v
  311. if parent then cur = v:Clone() cur.Parent = parent end
  312. cur.Pitch = pitch
  313. if volume then cur.Volume = volume end
  314. cur:Play()
  315. found = true
  316. return cur
  317. end
  318. end
  319. elseif type(id) == 'number' then
  320. local a = char.Head:FindFirstChild('exteo')
  321. a.SoundId = 'rbxassetid://'..id
  322. a.Pitch = pitch
  323. if volume then a.Volume = volume end
  324. a:Play()
  325. return a
  326. end
  327. end
  328. }
  329. function spaas(position,radius,number,number2,color)
  330. mode = Instance.new("Model",m)
  331. for i = 1,number2 do
  332. pos = position+v3n(M.R(-radius,radius),M.R(-radius,radius),M.R(-radius,radius))
  333. mag = (position-pos).magnitude
  334. col = color or 'Toothpaste'
  335. local laz = T.P(.1,mag,.1,col,0,false,true,mode)
  336. T.FM(laz,'cylinder',.3,1,.3)
  337. laz.CFrame = (cfn(position,pos)*cfn(0,0,-mag/2))*ang(math.pi/2,0,0)
  338. cframe = (laz.CFrame*cfn(0,-mag/2,0)).p
  339. pos2 = cframe+v3n(M.R(-radius,radius),M.R(-radius,radius),M.R(-radius,radius))
  340. mag2 = (cframe-pos2).magnitude
  341. local laz2 = T.P(.1,mag2,.1,col,0,false,true,mode)
  342. T.FM(laz2,'cylinder',.3,1,.3)
  343. laz2.CFrame = (cfn(cframe,pos2)*cfn(0,0,-mag2/2))*ang(math.pi/2,0,0)
  344. previo = laz2
  345. for i = 1,number do
  346. cframe = (previo.CFrame*cfn(0,-mag/2,0)).p
  347. pos2 = cframe+v3n(M.R(-radius,radius),M.R(-radius,radius),M.R(-radius,radius))
  348. mag2 = (cframe-pos2).magnitude
  349. local laz2 = T.P(.1,mag2,.1,col,0,false,true,mode)
  350. T.FM(laz2,'cylinder',.3,1,.3)
  351. laz2.CFrame = (cfn(cframe,pos2)*cfn(0,0,-mag2/2))*ang(math.pi/2,0,0)
  352. previo = laz2
  353. end
  354. end
  355. debris:AddItem(mode,.1)
  356. end
  357. function lightning(startpos,endpos,times,offse,livetime,col,dmg)
  358. local curpos = startpos
  359. for i = 1,times do
  360. mag = (startpos-endpos).magnitude offs = {-offse,offse}
  361. offset = v3n(offs[M.R(1,2)],offs[M.R(1,2)],offs[M.R(1,2)])
  362. laz = T.P(.1,.1,mag/times,col,0,false,true,m)
  363. if dmg then laz.Touched:connect(function(hit) damage(hit.Parent,dmg[1],dmg[2]) end) end
  364. apos = (cfn(curpos,endpos)*cfn(0,0,-mag/times)).p+offset
  365. if times == i then
  366. mag2 = (curpos-endpos).magnitude
  367. laz.Size = v3n(.1,.1,mag2)
  368. laz.CFrame = cfn(curpos,endpos)*cfn(0,0,-mag2/2)
  369. else
  370. laz.CFrame = cfn(curpos,apos)*cfn(0,0,-mag/times/2)
  371. end
  372. curpos = laz.CFrame*cfn(0,0,-mag/times/2).p debris:AddItem(laz,livetime)
  373. end
  374. end
  375. ------MESHIDS---
  376. meshids = {["penguin"] = 15853464, ["ring"] = 3270017,
  377. ["spike"] = 1033714,["cone"] = 1082802,["crown"] = 20329976,["crossbow"] = 15886761,
  378. ["cloud"] = 1095708,["mjolnir"] = 1279013,["diamond"] = 9756362, ["hand"] = 37241605,
  379. ["fist"] = 65322375,["skull"] = 36869983,["totem"] = 35624068,["spikeb"] = 9982590,["dragon"] = 58430372,["fish"] = 31221717, ["coffee"] = 15929962,["spiral"] = 1051557,
  380. ["ramen"] = 19380188,["lightning"] = 72583597,["bullet"]=2697549,['cheese'] = 1090700,["pan"] = 24342877,["ketchup"] = 29690481,
  381. ["duck"] = 9419831}---some meshids
  382. textureids = {["cone"] = 1082804,["rainbow"] = 28488599,["fish"] = 31221733, ["coffee"] = 24181455,["monster"] = 33366441,["ramen"] = 19380153,
  383. ["cheese"] = 1090703}
  384. soundids = {["bell"] = 20005706,["flintlock"] = 13510352,["falcon"] = 1387390,['sensa'] = 4700455,
  385. ['midas'] = 17385513;
  386. ['spark'] = 10756118;
  387. ['boom'] = 10730819;
  388. ['plank'] = 10548112;
  389. ['harmonica1'] = 33069371;
  390. ['harmonica2'] = 33069412;
  391. ['thump'] = 10730819;
  392. }
  393. for i,v in pairs(soundids) do
  394. for _,q in pairs(char.Head:children()) do
  395. if q.Name == i then q:Remove() end
  396. end
  397. end
  398. for i,v in pairs(soundids) do
  399. sound = Instance.new("Sound")
  400. sound.SoundId = "http://www.roblox.com/asset/?id="..v
  401. sound.Name = i
  402. sound.Parent = char.Head
  403. end
  404. M = {["R"] = function(a,b) return math.random(a,b) end,
  405. ["Cos"] = function(a) return math.cos(a) end,
  406. ["Sin"] = function(a) return math.sin(a) end,
  407. ["D"] = function(a) return math.rad(a) end
  408. }
  409. for i,v in pairs(char:children()) do
  410. if v:IsA("Hat") then v:Remove() end
  411. end
  412. hat = T.P(1,1,1,'White',0,false,false)
  413. T.FM(hat,57475891,1,1,1,'cheese')
  414. T.W(hat,char.Head,0,1,0,0,0,0)
  415. hat = T.P(1,1,1,'White',0,false,false)
  416. T.FM(hat,28165956,1.05,1,1.1,'cheese')
  417. T.W(hat,char.Head,0,0,0,0,0,0)
  418. torso.Transparency = 1
  419. p = T.P(1,2,2,'Black',0,false,false,m,'wedge') p.formFactor = 'Symmetric'
  420. T.W(p,torso,0,0,0,-math.pi/2,0,-math.pi/2)
  421. p2 = T.P(1,2,2,'New Yeller',0,false,false,m,'wedge') p2.formFactor = 'Symmetric'
  422. T.W(p2,torso,0,0,0,math.pi/2,0,math.pi/2)
  423. r = .6
  424. o = 55
  425. for e = -.5,.5,1 do
  426. for i = o,180+o,40 do
  427. q = T.P(.1,.3,.1,'New Yeller',0,false,false)
  428. T.FM(q,'block',.99,1,.99)
  429. T.W(q,torso,M.Cos(M.D(i))*r,M.Sin(M.D(i))*r,e,0,0,M.D(i))
  430. end
  431. for i = o+180,360+o,40 do
  432. q = T.P(.1,.3,.1,'Black',0,false,false)
  433. T.FM(q,'block',1,1,1)
  434. T.W(q,torso,M.Cos(M.D(i))*r,M.Sin(M.D(i))*r,e,0,0,M.D(i))
  435. end
  436. end
  437. q = T.P(1,1,1,'White',0,false,false)
  438. T.W(q,lleg,0,-.8,-.3,-math.pi/2,0,0)
  439. T.FM(q,48880435,1,1,1,'cheese')
  440. q = T.P(1,1,1,'White',0,false,false)
  441. T.W(q,rleg,0,-.8,-.3,-math.pi/2,0,0)
  442. T.FM(q,48880435,1,1,1,'cheese')
  443. staff = T.P(.3,4,.3,'Brown',0,false,false)
  444. hw = T.W(staff,torso,0,0,.5,0,0,M.D(-45)) normh = hw.C1
  445. ball = T.P(1,1,1,'Black',0,false,false) ball.Shape = 0
  446. mot = T.W(ball,staff,0,2.45,0,0,math.pi/2,0)
  447. mot.C0 = cfn()*ang(0,math.pi/2,0)
  448. eye = T.P(.1,.1,.1,'New Yeller',0,false,false) T.FM(eye,'sphere',1,1,1)
  449. T.W(eye,ball,.25,.2,-.35,0,0,0)
  450. eye = T.P(.1,.1,.1,'New Yeller',0,false,false) T.FM(eye,'sphere',1,1,1)
  451. T.W(eye,ball,-.25,.2,-.35,0,0,0)
  452. hat = T.P(1,1,1,'New Yeller',0,false,false)
  453. T.FM(hat,16627529,1,1,1)
  454. T.W(hat,ball,0,.4,0,M.D(5),0,0)
  455. mot.MaxVelocity = .1
  456. function zeero(mot,a) local oldvelocity = mot.MaxVelocity mot.MaxVelocity = 1.7E+308
  457. if a == nil then mot.DesiredAngle = 0
  458. else mot.DesiredAngle = a
  459. end
  460. while mot.DesiredAngle ~= mot.CurrentAngle do wait() end
  461. mot.MaxVelocity = oldvelocity
  462. end
  463. function ventta(mot)
  464. while mot.DesiredAngle ~= mot.CurrentAngle do wait() end
  465. end
  466. function findplayers(a,b)
  467. list = {}
  468. for _,v in pairs(Workspace:children()) do
  469. if v:IsA("Model") then
  470. for _,child in pairs(v:children()) do
  471. if child:IsA("Humanoid") then
  472. if (a-child.Torso.Position).magnitude < b then
  473. table.insert(list,child.Parent)
  474. end
  475. end
  476. end
  477. end
  478. end
  479. return list
  480. end
  481. function l(a,x,y,z,b)
  482. if b == nil then
  483. return a.CFrame*cfn(x,y,z)
  484. else
  485. return a*cfn(x,y,z)
  486. end
  487. end
  488. function damage(hit,amount,delay)
  489. for i,v in pairs(hit:children()) do
  490. if v:IsA("Humanoid") and v.Parent ~= char then
  491. if delay then
  492. local found = v:FindFirstChild('tag')
  493. if not found then
  494. local a = Instance.new("StringValue",v)
  495. a.Name = 'tag'
  496. debris:AddItem(a,delay)
  497. v.Health = v.Health - amount
  498. end
  499. else v.Health = v.Health - amount
  500. end
  501. end
  502. end
  503. end
  504. lock = {["R"] =
  505. function(a)
  506. if a == 1 then
  507. rabrick = T.P(1,1,1,"White",1,false,false)
  508. rw = T.W(rabrick,torso,1.5,.5,0,0,0,0)
  509. T.W(rarm,rabrick,0,-.5,0,0,0,0)
  510. elseif a == 2 then
  511. rlbrick = T.P(1,1,1,"White",1,false,false)
  512. rhw = T.W(rlbrick,torso,-.5,-1.5,0,0,0,0)
  513. T.W(rleg,rlbrick,0,-.5,0,0,0,0)
  514. elseif a == 0 then
  515. rs.Parent = torso
  516. rw.Parent = nil
  517. rabrick:Destroy() rabrick = nil
  518. elseif a == -1 then
  519. rhw.Parent = nil
  520. rh.Parent = torso
  521. rlbrick:Destroy() rlbrick = nil
  522. end
  523. end
  524. , ["L"] = function(a)
  525. if a == 1 then
  526. labrick = T.P(1,1,1,"White",1,false,false)
  527. lw = T.W(labrick,torso,-1.5,.5,0,0,0,0)
  528. T.W(larm,labrick,0,-.5,0,0,0,0)
  529. elseif a == 2 then
  530. llbrick = T.P(1,1,1,"White",1,false,false)
  531. lhw = T.W(llbrick,torso,.5,-1.5,0,0,0,0)
  532. T.W(lleg,llbrick,0,-.5,0,0,0,0)
  533. elseif a == 0 then
  534. ls.Parent = torso
  535. lw.Parent = nil
  536. labrick:Destroy() labrick = nil
  537. elseif a == -1 then
  538. lhw.Parent = nil
  539. lh.Parent = torso
  540. llbrick:Destroy() llbrick = nil
  541. end
  542. end
  543. }
  544. function equip()
  545. if not equipped then
  546. equipped = true
  547. hw.Part1 = rarm
  548. hw.C1 = cfn(0,-1,0)*ang(-math.pi/2,0,0)
  549. elseif equipped then
  550. equipped = false
  551. hw.Part1 = torso
  552. hw.C1 = cfn(0,0,.5)*ang(0,0,M.D(-45))
  553. end
  554. normh = hw.C1
  555. end
  556. mag = _
  557. function findground(position)
  558. local ray = Ray.new(position.p,position.p+(position.p-v3n(0,200,0)).unit*200)
  559. local obj,pos2 = Workspace:FindPartOnRay(ray,m)
  560. if obj and pos2 then return obj,pos2 else return nil end
  561. end
  562. function attack()
  563. lock.R(1)
  564. for i = 0,1,.1 do
  565. rw.C1 = normposr*ang(M.D(90*i),0,0)
  566. hw.C1 = normh*ang(M.D(-90*i),0,0)*cfn(0,2*i,0)
  567. wait()
  568. end
  569. mot.DesiredAngle = math.pi/2
  570. ventta(mot)
  571. cannon = T.P(.3,.1,.3,'White',0,false,false)
  572. T.FM(cannon,'cylinder',1,1,1)
  573. wld = T.W(cannon,ball,0,-.2,-.5,math.pi/2,0,0)
  574. for i = 0,1,.1 do
  575. cannon.Size = v3n(.3,2*i,.3)
  576. wld.Parent,wld.Part1 = m,ball
  577. wld.C1 = cfn(0,-.2,-1*i)*ang(math.pi/2,0,0)
  578. wait()
  579. end
  580. local bullet = T.P(1,1,1,'New Yeller',0,true,true) T.FM(bullet,'sphere',1,1,1)
  581. bullet.CFrame = cannon.CFrame*cfn(0,-2,0)
  582. local ray = Ray.new(cannon.Position,cannon.Position+torso.CFrame.lookVector*50)
  583. local obj,pos = Workspace:FindPartOnRay(ray,m)
  584. if obj and pos then mag = (cannon.Position-pos).magnitude else mag = 50 end
  585. cf = cannon.CFrame*cfn(0,-2,0)
  586. T.C(function()
  587. while bullet.Parent ~= nil do
  588. local obj,pos2 = findground(bullet.CFrame)
  589. if pos2 then
  590. T.C(function()
  591. local ef = T.P(1,1,1,'Magenta',0,false,true)
  592. ef.CFrame = cfn(pos2)
  593. local msh = T.FM(ef,'crown',1,1,1)
  594. for i = 1,10 do
  595. msh.Scale = v3n(i,1,i)
  596. ef.Transparency = i/10
  597. wait()
  598. end
  599. ef:Remove()
  600. end)
  601. end
  602. wait(.1)
  603. end
  604. end)
  605. T.C(function()
  606. for i = 0,mag,1 do
  607. bullet.CFrame = cf*cfn(0,-i,0)
  608. wait()
  609. end
  610. local p = T.P(1,1,1,'Black',0,false,true)
  611. p.CFrame = bullet.CFrame
  612. bullet:Remove()
  613. local msh = T.FM(p,'sphere',1,1,1)
  614. ring = T.P(1,1,1,'Black',0,false,true)
  615. ring.CFrame = p.CFrame
  616. ringm = T.FM(ring,'ring',1,1,1)
  617. local sw = T.P(1,1,1,'New Yeller',1,false,true)
  618. sw.CFrame = p.CFrame
  619. ground,groundp = findground(p.CFrame)
  620. if ground then
  621. for i = 1,5 do
  622. p2 = T.P(20,1,20,ground.BrickColor.Name,ground.Transparency,true,true)
  623. p2.TopSurface,p2.BottomSurface = ground.TopSurface,ground.BottomSurface
  624. p2.CFrame = cfn(groundp)*cfn(0,-1,0)*ang(M.D(M.R(-20,20)),M.D(M.R(-20,20)),M.D(M.R(-20,20)))
  625. end
  626. end
  627. for i = 0,1,.05 do
  628. msh.Scale = v3n(60*i,60*i,60*i)
  629. ringm.Scale = v3n(60*i,60*i,0)
  630. ring.CFrame = p.CFrame*ang(M.D(360*i),0,0)
  631. ring.Transparency = i
  632. p.Transparency = i
  633. wait()
  634. end
  635. ring:Remove()
  636. p:Remove()
  637. end)
  638. for i = 1,0,-.1 do
  639. rw.C1 = normposr*ang(M.D(90*i),0,0)
  640. hw.C1 = normh*ang(M.D(-90*i),0,0)*cfn(0,2*i,0)
  641. cannon.Size = v3n(.3,2*i,.3)
  642. wld.Parent,wld.Part1 = m,ball
  643. wld.C1 = cfn(0,-.2,-1*i)*ang(math.pi/2,0,0)
  644. wait()
  645. end
  646. cannon:Remove()
  647. lock.R(0)
  648. end
  649. function lasso(mouse)
  650. bg = T.BG(head) cf = bg.cframe
  651. lock.L(1) lock.R(1)
  652. rw.C1 = normposr*ang(0,0,M.D(10))
  653. lw.C1 = normposl*ang(0,0,-math.pi/2)
  654. cheese = T.P(1,1,1,'White',0,true,false)
  655. wld = T.W(cheese,larm,0,-1,0,0,0,0)
  656. T.FM(cheese,'cheese',1,1,1,'cheese').VertexColor = v3n(.1,.5,0)
  657. holding = true
  658. while holding do wait() bg.cframe = cfn(head.Position,v3n(mouse.hit.p.x,char.Head.Position.y,mouse.hit.p.z))*ang(0,-math.pi/2,0) end
  659. wld:Remove()
  660. cf = (larm.CFrame*cfn(0,-4,0))
  661. cheese.CFrame = cf
  662. genNew('Smoke',cheese,{
  663. Color = Color3.new(0,.5,0);
  664. Size = 1;
  665. RiseVelocity = 10;
  666. })
  667. debris:AddItem(cheese,3)
  668. Instance.new("BodyForce",cheese).force = cfn(cf.p,(cf*cfn(0,-4,0)).p).lookVector*100 + v3n(0,cheese:GetMass()+floatforce,0)
  669. lw.C1 = normposl*ang(0,0,M.D(-120))
  670. wait(.1)
  671. lw.C1 = normposl*ang(0,0,-math.pi/2)
  672. bg:Remove()
  673. lock.L(0) lock.R(0)
  674. end
  675. hum = char.Humanoid
  676. restbp = nil
  677. restbg = nil
  678. function rest()
  679. if not restbp then
  680. lock.R(1) lock.L(1) lock.R(2) lock.L(2)
  681. tyu = cfn(.2,.2,-.2)
  682. tyu1 = cfn(-.2,.2,-.2)
  683. tyu2 = cfn(-.1,.2,-.2)
  684. rw.C1 = (holdpos*tyu1)*ang(M.D(100),0,M.D(-30))
  685. lw.C1 = (holdpos2*tyu)*ang(M.D(100),0,M.D(30))
  686. neck.C0 = normposn*ang(M.D(20),0,0)
  687. lhw.C1 = (normposl2*tyu2)*ang(M.D(20),0,M.D(-20))
  688. rhw.C1 = (normposr2)*ang(M.D(5),0,M.D(10))
  689. pos = torso.CFrame
  690. restbp = T.BP(torso,pos.p)
  691. cloud = T.P(5,2,5,'White',0,false,false) T.FM(cloud,'cheese',6,2,6,'cheese').VertexColor = v3n(1,1,0)
  692. cloud.Position = pos.p
  693. T.W(cloud,torso,0,1,.8,-math.pi/2,M.D(-22.5),0)
  694. T.C(function()
  695. while wait() do
  696. for i = 0,.5,.05 do
  697. restbp.position = pos.p+v3n(0,i,0)
  698. wait(.2)
  699. end
  700. for i = .5,0,-.05 do
  701. restbp.position = pos.p+v3n(0,i,0)
  702. wait(.2)
  703. end
  704. end
  705. end)
  706. restbg = T.BG(torso)
  707. restbg.cframe = pos*ang(math.pi/2,0,0)
  708. hum.PlatformStand = true
  709. else
  710. hum.PlatformStand = false
  711. for i = -1,0 do lock.R(i) lock.L(i) end
  712. cloud:Remove()
  713. restbp:Remove()
  714. restbg:Remove()
  715. neck.C0 = normposn
  716. torso.CFrame = pos
  717. restbp,restbg = nil,nil
  718. end
  719. end
  720. function dance()
  721. lock.R(1) lock.L(1) lock.R(2) lock.L(2)
  722. for _ = 0,3 do
  723. for i = 0,1,.2 do
  724. lhw.C1 = normposl2*ang(M.D(50*i),0,M.D(50*i))
  725. rhw.C1 = normposr2*ang(M.D(50*-i),0,M.D(50*-i))
  726. lw.C1 = holdpos2*ang(0,0,M.D(50*-i))
  727. rw.C1 = holdpos*ang(0,0,M.D(50*-i))
  728. neck.C0 = normposn*ang(M.D(30*i),0,0)
  729. wait()
  730. end
  731. for i = 1,-1,-.2 do
  732. lhw.C1 = normposl2*ang(M.D(50*i),0,M.D(50*i))
  733. rhw.C1 = normposr2*ang(M.D(50*-i),0,M.D(50*-i))
  734. lw.C1 = holdpos2*ang(0,0,M.D(50*-i))
  735. rw.C1 = holdpos*ang(0,0,M.D(50*-i))
  736. neck.C0 = normposn*ang(M.D(30*i),0,0)
  737. wait()
  738. end
  739. for i = -1,0,.2 do
  740. lhw.C1 = normposl2*ang(M.D(50*i),0,M.D(50*i))
  741. rhw.C1 = normposr2*ang(M.D(50*-i),0,M.D(50*-i))
  742. lw.C1 = holdpos2*ang(0,0,M.D(50*-i))
  743. rw.C1 = holdpos*ang(0,0,M.D(50*-i))
  744. neck.C0 = normposn*ang(M.D(30*i),0,0)
  745. wait()
  746. end
  747. end
  748. lock.R(0) lock.L(0) lock.R(-1) lock.L(-1)
  749. end
  750. levbg = nil
  751. function levitate()
  752. if not levbp then
  753. levbp = T.BP(torso,torso.Position)
  754. else levbp:Remove() levbp = nil
  755. end
  756. end
  757. function test()
  758. lock.R(1)
  759. for i = 0,1,.1 do
  760. wait()
  761. rw.C1 = holdpos*ang(0,0,M.D(45+90*i))
  762. end
  763. for i = 1,0,-.1 do
  764. wait()
  765. rw.C1 = holdpos*ang(0,0,M.D(45+90*i))
  766. end
  767. lock.R(0)
  768. end
  769. function fly(mouse)
  770. levbg = T.BG(torso)
  771. holding = true
  772. lock.R(1) lock.L(1)
  773. T.C(function()
  774. while holding do
  775. for i = 0,1,.1 do
  776. wait()
  777. rw.C1 = holdpos*ang(0,0,M.D(45+90*i))
  778. lw.C1 = holdpos2*ang(0,0,-M.D(45+90*i))
  779. end
  780. for i = 1,0,-.1 do
  781. wait()
  782. rw.C1 = holdpos*ang(0,0,M.D(45+90*i))
  783. lw.C1 = holdpos2*ang(0,0,-M.D(45+90*i))
  784. end
  785. end
  786. end)
  787. while holding do
  788. ches = T.P(1,1,1,'White',0,true,false)
  789. T.FM(ches,'cheese',1,1,1,'cheese')
  790. debris:AddItem(ches,1)
  791. Instance.new("Sparkles",ches)
  792. ches.CFrame = torso.CFrame*cfn(0,-3,0)
  793. levbg.cframe = cfn(torso.Position,mouse.hit.p)*ang(-math.pi/2,0,0)
  794. levbp.position = torso.Position + (torso.Position-mouse.hit.p).unit*-10
  795. wait()
  796. end
  797. lock.R(0) lock.L(0)
  798. levbg:Remove() levbg = nil
  799. end
  800. function sel(mouse)
  801. if levbp then
  802. fly(mouse)
  803. elseif equipped then attack()
  804. else
  805. lasso(mouse)
  806. end
  807. end
  808. klist = {
  809. {'c',function() rest() end};
  810. {'f',function() dance() end};
  811. {'q',function() levitate() end};
  812. {'r',function() equip() end};
  813. }
  814. hop.Deselected:connect(function() lock.R(0) lock.L(0) end)
  815. hop.Selected:connect(function(mouse)
  816. mouse.Button1Up:connect(function() holding = false end)
  817. 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)
  818. mouse.KeyDown:connect(function(key)
  819. if attacking then return end
  820. for i,v in pairs(klist) do
  821. if key == v[1] then attacking = true v[2](mouse) attacking = false end
  822. end
  823. end)
  824. mouse.Button1Down:connect(function() if attacking then return end attacking = true sel(mouse) attacking = false end)
  825. end)
  826. --mediafire
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement