Advertisement
EmeraldIT

Untitled

Oct 23rd, 2019
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.81 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  3. do
  4. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  5. script.Parent = Player.Character
  6.  
  7. --RemoteEvent for communicating
  8. local Event = Instance.new("RemoteEvent")
  9. Event.Name = "UserInput_Event"
  10.  
  11. --Fake event to make stuff like Mouse.KeyDown work
  12. local function fakeEvent()
  13. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  14. t.connect = t.Connect
  15. return t
  16. end
  17.  
  18. --Creating fake input objects with fake variables
  19. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  20. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  21. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  22. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  23. end}
  24. --Merged 2 functions into one by checking amount of arguments
  25. CAS.UnbindAction = CAS.BindAction
  26.  
  27. --This function will trigger the events that have been :Connect()'ed
  28. local function te(self,ev,...)
  29. local t = m[ev]
  30. if t and t._fakeEvent and t.Function then
  31. t.Function(...)
  32. end
  33. end
  34. m.TrigEvent = te
  35. UIS.TrigEvent = te
  36.  
  37. Event.OnServerEvent:Connect(function(plr,io)
  38. if plr~=Player then return end
  39. if io.isMouse then
  40. m.Target = io.Target
  41. m.Hit = io.Hit
  42. else
  43. local b = io.UserInputState == Enum.UserInputState.Begin
  44. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  45. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  46. end
  47. for _,t in pairs(CAS.Actions) do
  48. for _,k in pairs(t.Keys) do
  49. if k==io.KeyCode then
  50. t.Function(t.Name,io.UserInputState,io)
  51. end
  52. end
  53. end
  54. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  55. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  56. end
  57. end)
  58. Event.Parent = NLS([==[
  59. local Player = game:GetService("Players").LocalPlayer
  60. local Event = script:WaitForChild("UserInput_Event")
  61.  
  62. local UIS = game:GetService("UserInputService")
  63. local input = function(io,a)
  64. if a then return end
  65. --Since InputObject is a client-side instance, we create and pass table instead
  66. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  67. end
  68. UIS.InputBegan:Connect(input)
  69. UIS.InputEnded:Connect(input)
  70.  
  71. local Mouse = Player:GetMouse()
  72. local h,t
  73. --Give the server mouse data 30 times every second, but only if the values changed
  74. --If player is not moving their mouse, client won't fire events
  75. while wait(1/30) do
  76. if h~=Mouse.Hit or t~=Mouse.Target then
  77. h,t=Mouse.Hit,Mouse.Target
  78. Event:FireServer({isMouse=true,Target=t,Hit=h})
  79. end
  80. end]==],Player.Character)
  81. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  82. end
  83.  
  84. Phoenix = game.Players.PhoenixClockworks
  85. bag = Phoenix.Backpack
  86. equipped = false
  87. demolition = false
  88. stairs = false
  89. anger = false
  90. shield = false
  91. fol = Instance.new("Folder", Phoenix.Character)
  92.  
  93. Gem = Instance.new("Part")
  94. Gem.CanCollide = false
  95. Gem.Material = "Neon"
  96. Gem.Size = Vector3.new(1.5,1.5,1.5)
  97. Gem.Color = BrickColor.new("White").Color
  98. Gem.Name = "Handle"
  99. GemShine = Gem:Clone()
  100. GemShine.Size = Vector3.new(1.55,1.55,1.55)
  101. GemShine.Material = "Glass"
  102. GemShine.Color = BrickColor.new("Medium blue").Color
  103. GemShine.Transparency = 0.5
  104. GemShine.Reflectance = 0.5
  105. GemShine.Name = "TheHandlesShine"
  106. Gem.Locked = true
  107. GemShine.Locked = true
  108. GemWeld = Instance.new("Weld", Gem)
  109. GemWeld.Part0 = Gem
  110. GemWeld.Part1 = GemShine
  111. Tool = Instance.new("Tool", bag)
  112. Gem.Parent = Tool
  113. GemShine.Parent = Gem
  114.  
  115. ch = owner.Character
  116. tor = ch.HumanoidRootPart
  117. local whitelist = {"Anime_fivers","Lewzys","Astr0_Food","DrakerMaker","Disrevoid","EwncewlEthel","VarixDog"}
  118.  
  119. --[[ball = function()
  120.  
  121. B = Instance.new("Part", script)
  122. B.CanCollide = false
  123. B.Shape = "Ball"
  124. B.Material = "ForceField"
  125. B.Size = Vector3.new(12.5,12.5,12.5)
  126. B.Anchored = true
  127. B.Color = Color3.fromRGB(0,255,50)
  128. return B
  129. end
  130.  
  131. Ball = nil
  132.  
  133. Ball = ball()
  134. ]]
  135. local Pt = Instance.new('ParticleEmitter', tor)
  136. Pt.Rate = 0
  137. Pt.Drag = 3
  138. Pt.SpreadAngle = Vector2.new(-180, 180)
  139. Pt.Color = ColorSequence.new(Color3.fromRGB(0,255,100))
  140. Pt.LightEmission = 1
  141. Pt.ZOffset = 1
  142. Pt.LockedToPart = true
  143. Pt.Speed = NumberRange.new(20)
  144. Pt.Lifetime = NumberRange.new(3)
  145. Pt.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,1,0), NumberSequenceKeypoint.new(0.7,0,0), NumberSequenceKeypoint.new(1,1,0)})
  146. Pt.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,1,0), NumberSequenceKeypoint.new(1,5,0)})
  147. Pt.RotSpeed = NumberRange.new(1,10)
  148. ForceField = Instance.new("ForceField")
  149. ForceField.Parent = owner.Character
  150. ForceField.Visible = false
  151.  
  152. paused = true
  153.  
  154. CreateRegion3FromLocAndSize = function(Position, Size)
  155.  
  156. local SizeOffset = Size / 2
  157. local Point1 = Position - SizeOffset
  158. local Point2 = Position + SizeOffset
  159. return Region3.new(Point1, Point2)
  160. end
  161.  
  162. game:GetService("RunService").Heartbeat:connect(function()
  163. if paused == true then return end
  164. pcall(function()
  165.  
  166.  
  167. local void = ch:GetChildren()
  168. for _,pl in pairs(whitelist) do
  169. if game.Players:FindFirstChild(pl) ~= nil and game.Players:FindFirstChild(pl).Character ~= nil then
  170. for i,v in pairs(game.Players[pl].Character:GetChildren()) do
  171. table.insert(void, v)
  172. end
  173. end
  174. end
  175.  
  176.  
  177. local reg = CreateRegion3FromLocAndSize(tor.CFrame.p, Vector3.new(15, 15, 15))
  178. for i,v in pairs(game.Workspace:FindPartsInRegion3WithIgnoreList(reg, void, 100)) do
  179. if v.Name ~= "Base" then
  180. v:Destroy()
  181. end
  182. end
  183.  
  184.  
  185. end)
  186. end)
  187.  
  188.  
  189. function fling(hit)
  190. if hit.Parent.Parent.ClassName == "Script" or hit.Parent.Parent.ClassName == "LocalScript" then hit.Parent.Parent = workspace end
  191. if hit.Name ~= "Base" and hit.Parent ~= char and hit.Parent.Parent ~= char and hit ~= Gem and hit ~= GemShine then
  192. if hit.ClassName == "Part" or hit.ClassName == "MeshPart" or hit.ClassName == "BasePart" or hit.ClassName == "CornerWedgePart" or hit.ClassName == "WedgePart" or hit.ClassName == "TrussPart" then
  193. pcall(function() hit:BreakJoints() end)
  194. hit.Anchored = false
  195. A1 = Instance.new("Attachment",hit)
  196. A1.Position = Vector3.new(0, 2, 0)
  197. local A2 = Instance.new("Attachment",hit)
  198. A2.Position = Vector3.new(0, -2, 0)
  199. local Trail = Instance.new("Trail",hit)
  200. Trail.LightEmission = 1
  201. Trail.FaceCamera = true
  202. Trail.Texture = "rbxassetid://945758042"
  203. Trail.Attachment0 = A1
  204. Trail.Attachment1 = A2
  205. Trail.Lifetime = 1
  206. Trail.MinLength = 0
  207. Trail.Transparency = NumberSequence.new(0, 0)
  208. Trail.Color = ColorSequence.new(BrickColor.new("Dark indigo").Color,BrickColor.new("Royal purple").Color)
  209. hit.Velocity = Vector3.new(hit.Velocity.X+ math.random(-200,200), hit.Velocity.Y + math.random(-200,200), hit.Velocity.Z+ math.random(-200,200))
  210. end
  211. end
  212. end
  213.  
  214. function rainbowmode()
  215. Geem = Gem:Clone()
  216. Geem.Name = "NotHandle"
  217. Gem.Transparency = 1
  218. GemShine.Transparency = 1
  219. Geem.Anchored = true
  220. Geem.CanCollide = false
  221. Geem.TheHandlesShine.CanCollide = false
  222. Geem.Parent = fol
  223. for i = 1,50 do
  224. Geem.CFrame = Geem.CFrame:Lerp(Geem.CFrame * CFrame.new(0,20,0) * CFrame.Angles(0,360,0), 0.1)
  225. wait()
  226. end
  227. end
  228.  
  229. rainbow = false
  230.  
  231. mouse.Button1Down:Connect(function()
  232. if equipped == true then
  233. if rainbow == false then
  234. if shield ~= true then
  235. spawn(function()
  236. local ray = Ray.new(Gem.CFrame.p,(mouse.Hit.p-Gem.CFrame.p).unit*1000)
  237. local part,position = workspace:FindPartOnRay(ray,Phoenix.Character, false, true)
  238. local distance = (Gem.CFrame.p - position).magnitude
  239. if part then
  240. if part.Parent:FindFirstChild("Humanoid") then
  241. part:BreakJoints()
  242. part.Anchored=false
  243. end
  244. end
  245.  
  246. local beam = Instance.new("Part", fol)
  247. beam.BrickColor = GemShine.BrickColor
  248. beam.FormFactor = "Custom"
  249. beam.Material = "Neon"
  250. beam.Transparency = 0.5
  251. if shield == true then
  252. beam.Transparency = 1
  253. end
  254. if stairs == true then
  255. beam.Transparency = 1
  256. end
  257. beam.Anchored = true
  258. beam.Locked = true
  259. beam.CanCollide = false
  260. beam.Size = Vector3.new(0.3, 0.3, distance)
  261. beam.CFrame = CFrame.new((Gem.CFrame*CFrame.new(0,0,0)).p, mouse.Hit.p) * CFrame.new(0, 0, -distance/2)
  262.  
  263. staircasing = false
  264.  
  265. if stairs == true then
  266. staircase()
  267. end
  268.  
  269. beam.Touched:Connect(function(h)
  270. if stairs == false then
  271.  
  272. if anger == true then
  273.  
  274. if h.Parent.Name ~= owner.Character.Name and h ~= Gem and h ~= GemShine and h.Parent ~= fol then
  275. if h.ClassName == "BasePart" or h.ClassName == "Part" or h.ClassName == "MeshPart" then
  276. if h.Name == "Base" then return end
  277. h.Anchored = false
  278. if h.Parent.ClassName == "Model" then
  279. h.Parent:BreakJoints()
  280. for _,v in pairs(h:GetChildren()) do
  281. if v.ClassName == "Part" or v.ClassName == "MeshPart" or v.ClassName == "BasePart" then
  282. v.Parent = workspace
  283. v.Anchored = false
  284. v.Velocity = Vector3.new(math.random(-1000,1000), math.random(-1000,1000), math.random(-1000,1000))
  285. elseif v.ClassName == "Weld" then
  286. v:Remove()
  287. end
  288. end
  289. end
  290. h.Velocity = Vector3.new(math.random(-1000,1000), math.random(-1000,1000), math.random(-1000,1000))
  291. end
  292. if h.Parent.ClassName == "Accessory" or h.ClassName == "Accessory" then return end
  293. game.Debris:AddItem(h,3)
  294. end
  295.  
  296. elseif demolition == true then
  297.  
  298. if h.Parent ~= workspace and h.Locked ~= true and h.Parent ~= ch then
  299. for _,v in pairs(h.Parent:GetChildren()) do
  300. if v:IsA("Weld") or v:IsA("Attachment") then
  301. v:Destroy()
  302. end
  303. end
  304. h.Parent:BreakJoints()
  305. for _,v in pairs(h.Parent:GetChildren()) do
  306. if v:IsDescendantOf(Phoenix) then return end
  307. v.Anchored = false
  308. v.Parent:BreakJoints()
  309. v.Velocity = Vector3.new(v.Velocity.X+ math.random(-200,200), v.Velocity.Y + math.random(-200,200), v.Velocity.Z+ math.random(-200,200))
  310. end
  311. end
  312.  
  313. end
  314. end
  315. end)
  316. spawn(function()
  317. game.Debris:AddItem(beam,2)
  318. for i=1,30 do
  319. if stairs == true then
  320. beam.Transparency=1
  321. end
  322. if shield == true then
  323. beam.Transparency=1
  324. end
  325. if shield == false and stairs == false then
  326. beam.Transparency=i/30
  327. end
  328. wait()
  329. end
  330. end)
  331. spawn(function()
  332. for i=1,30 do
  333. if anger == false then
  334. beam.Size=Vector3.new(i/4,i/4,beam.Size.Z)
  335. else
  336. beam.Size=Vector3.new(i,i,beam.Size.Z)
  337. end
  338. wait()
  339. end
  340. end)
  341. spawn(function()
  342. for i=1,30 do
  343. beam.CFrame = beam.CFrame * CFrame.Angles(0,0,0.1)
  344. wait()
  345. end
  346. end)
  347. end)
  348. elseif shield == true then
  349. if paused == true then
  350. paused = false
  351. Pt.Rate = 75
  352. elseif paused == false then
  353. paused =true
  354. Pt.Rate = 0
  355. end
  356. elseif rainbow == true then
  357. rainbowmode()
  358. end
  359. end
  360. end)
  361.  
  362. function staircase()
  363. Part1 = Instance.new("Part", fol)
  364. Part1.Size = Vector3.new(5,1,5)
  365. Part1.Material = "Neon"
  366. Part1.Anchored = true
  367. Part1.CFrame = Phoenix.Character.HumanoidRootPart.CFrame * CFrame.new(0,-3,0)
  368. Part2 = Instance.new("Part", fol)
  369. Part2.Size = Vector3.new(5.05,1.05,5.05)
  370. Part2.Material = "Glass"
  371. Part2.Anchored = true
  372. Part2.CFrame = Phoenix.Character.HumanoidRootPart.CFrame * CFrame.new(0,-3,0)
  373. Part2.Transparency = 0.5
  374. Part2.Color = BrickColor.new("Bright orange").Color
  375. Part2.Reflectance = 0.5
  376. game.Debris:AddItem(Part1,10)
  377. game.Debris:AddItem(Part2,10)
  378. number = 0
  379. spawn(function()
  380. for i = 1,9 do
  381. number = number + 5
  382. Part1 = Instance.new("Part", fol)
  383. Part1.Size = Vector3.new(5,1,5)
  384. Part1.Material = "Neon"
  385. Part1.Anchored = true
  386. Part1.CFrame = Phoenix.Character.HumanoidRootPart.CFrame * CFrame.new(math.random(-3,3),number,0-number)
  387. Part2 = Instance.new("Part", fol)
  388. Part2.Size = Vector3.new(5.05,1.05,5.05)
  389. Part2.Material = "Glass"
  390. Part2.Anchored = true
  391. Part2.CFrame = Part1.CFrame
  392. Part2.Transparency = 0.5
  393. Part2.Color = BrickColor.new("Bright orange").Color
  394. Part2.Reflectance = 0.5
  395. game.Debris:AddItem(Part1,10)
  396. game.Debris:AddItem(Part2,10)
  397. wait()
  398. end
  399. end)
  400. end
  401.  
  402. Tool.Equipped:Connect(function()
  403. equipped = true
  404. end)
  405.  
  406. Tool.Unequipped:Connect(function()
  407. equipped = false
  408. end)
  409.  
  410. transforming = false
  411.  
  412. Mouse.KeyDown:Connect(function(k)
  413. if k == "z" then
  414. if transforming == true then return end
  415. transforming = true
  416. anger = true
  417. stairs = false
  418. shield = false
  419. demolition = false
  420. rainbow = false
  421. spawn(function()
  422. for i = 1,30 do
  423. GemShine.Color = GemShine.Color:Lerp(Color3.fromRGB(255,0,0),0.1)
  424. wait()
  425. end
  426. transforming = false
  427. end)
  428. elseif k == "x" then
  429. if transforming == true then return end
  430. transforming = true
  431. anger = false
  432. stairs = false
  433. shield = false
  434. demolition = true
  435. rainbow = false
  436. spawn(function()
  437. for i = 1,30 do
  438. GemShine.Color = GemShine.Color:Lerp(BrickColor.new("Dark indigo").Color,0.1)
  439. wait()
  440. end
  441. transforming = false
  442. end)
  443. elseif k == "c" then
  444. if transforming == true then return end
  445. transforming = true
  446. anger = false
  447. stairs = true
  448. shield = false
  449. demolition = false
  450. rainbow = false
  451. spawn(function()
  452. for i = 1,30 do
  453. GemShine.Color = GemShine.Color:Lerp(BrickColor.new("Bright orange").Color,0.1)
  454. wait()
  455. end
  456. transforming = false
  457. end)
  458. elseif k == "b" then
  459. if transforming == true then return end
  460. transforming = true
  461. anger = false
  462. stairs = false
  463. shield = false
  464. demolition = false
  465. rainbow = false
  466. spawn(function()
  467. for i = 1,30 do
  468. GemShine.Color = GemShine.Color:Lerp(BrickColor.new("Medium blue").Color,0.1)
  469. wait()
  470. end
  471. transforming = false
  472. end)
  473. elseif k == "v" then
  474. if transforming == true then return end
  475. transforming = true
  476. anger = false
  477. stairs = false
  478. shield = true
  479. demolition = false
  480. rainbow = false
  481. spawn(function()
  482. for i = 1,30 do
  483. GemShine.Color = GemShine.Color:Lerp(BrickColor.new("Lime green").Color,0.1)
  484. wait()
  485. end
  486. transforming = false
  487. end)
  488. elseif k == "p" then
  489. if transforming == true then return end
  490. transforming = true
  491. anger = false
  492. stairs = false
  493. shield = false
  494. demolition = false
  495. rainbow = true
  496. spawn(function()
  497. for i = 1,30 do
  498. GemShine.Color = GemShine.Color:Lerp(BrickColor.new("White").Color,0.1)
  499. wait()
  500. end
  501. transforming = false
  502. end)
  503. end
  504. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement