Advertisement
DarkSideYT123

Untitled

Aug 23rd, 2019
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.20 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,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5. print("FE Compatibility code by Mokiros")
  6. local rp = RealPlayer
  7. script.Parent = rp.Character
  8.  
  9. --RemoteEvent for communicating
  10. local Event = Instance.new("RemoteEvent")
  11. Event.Name = "UserInput_Event"
  12.  
  13. --Fake event to make stuff like Mouse.KeyDown work
  14. local function fakeEvent()
  15. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  16. t.connect = t.Connect
  17. return t
  18. end
  19.  
  20. --Creating fake input objects with fake variables
  21. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  22. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  23. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  24. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  25. end}
  26. --Merged 2 functions into one by checking amount of arguments
  27. CAS.UnbindAction = CAS.BindAction
  28.  
  29. --This function will trigger the events that have been :Connect()'ed
  30. local function te(self,ev,...)
  31. local t = m[ev]
  32. if t and t._fakeEvent then
  33. for _,f in pairs(t.Functions) do
  34. f(...)
  35. end
  36. end
  37. end
  38. m.TrigEvent = te
  39. UIS.TrigEvent = te
  40.  
  41. Event.OnServerEvent:Connect(function(plr,io)
  42. if plr~=rp then return end
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. if not io.isMouse then
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local Mouse = Player:GetMouse()
  66. local UIS = game:GetService("UserInputService")
  67. local input = function(io,a)
  68. if a then return end
  69. --Since InputObject is a client-side instance, we create and pass table instead
  70. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  71. end
  72. UIS.InputBegan:Connect(input)
  73. UIS.InputEnded:Connect(input)
  74.  
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84.  
  85. ----Sandboxed game object that allows the usage of client-side methods and services
  86. --Real game object
  87. local _rg = game
  88.  
  89. --Metatable for fake service
  90. local fsmt = {
  91. __index = function(self,k)
  92. local s = rawget(self,"_RealService")
  93. if s then return s[k] end
  94. end,
  95. __newindex = function(self,k,v)
  96. local s = rawget(self,"_RealService")
  97. if s then s[k]=v end
  98. end,
  99. __call = function(self,...)
  100. local s = rawget(self,"_RealService")
  101. if s then return s(...) end
  102. end
  103. }
  104. local function FakeService(t,RealService)
  105. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  106. return setmetatable(t,fsmt)
  107. end
  108.  
  109. --Fake game object
  110. local g = {
  111. GetService = function(self,s)
  112. return self[s]
  113. end,
  114. Players = FakeService({
  115. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  116. },"Players"),
  117. UserInputService = FakeService(UIS,"UserInputService"),
  118. ContextActionService = FakeService(CAS,"ContextActionService"),
  119. }
  120. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  121. g.service = g.GetService
  122.  
  123. g.RunService = FakeService({
  124. RenderStepped = _rg:GetService("RunService").Heartbeat,
  125. BindToRenderStep = function(self,name,_,fun)
  126.  
  127. end,
  128. UnbindFromRenderStep = function(self,name)
  129. self._btrs[name]:Disconnect()
  130. end,
  131. },"RunService")
  132.  
  133. setmetatable(g,{
  134. __index=function(self,s)
  135. return _rg:GetService(s) or typeof(_rg[s])=="function"
  136. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  137. end,
  138. __newindex = fsmt.__newindex,
  139. __call = fsmt.__call
  140. })
  141. --Changing owner to fake player object to support owner:GetMouse()
  142. game,owner = g,g.Players.LocalPlayer
  143. end
  144.  
  145.  
  146. wait(1)
  147.  
  148. --==< A script made by DarkSideYT123
  149.  
  150. print("Script by DarkSideYT123")
  151. local Player = game.Players.LocalPlayer
  152. local Character = Player.Character
  153. Character["Right Arm"].Transparency = 1
  154. Character["Right Leg"].Transparency = 1
  155. Character["Left Arm"].Transparency = 1
  156. Character["Left Leg"].Transparency = 1
  157. Character["Head"].Transparency = 1
  158. Character["Torso"].Transparency = 1
  159. Character["Head"].face.Transparency = 1
  160. Machine = false
  161. print("Controls:")
  162. Character.Archivable = true
  163.  
  164. -- Removing Accessories
  165.  
  166. if Character:FindFirstChildOfClass("Accessory") then
  167. Character:FindFirstChildOfClass("Accessory"):Destroy()
  168. end
  169. if Character:FindFirstChildOfClass("Accessory") then
  170. Character:FindFirstChildOfClass("Accessory"):Destroy()
  171. end
  172. if Character:FindFirstChildOfClass("Accessory") then
  173. Character:FindFirstChildOfClass("Accessory"):Destroy()
  174. end
  175. if Character:FindFirstChildOfClass("Accessory") then
  176. Character:FindFirstChildOfClass("Accessory"):Destroy()
  177. end
  178. if Character:FindFirstChildOfClass("Accessory") then
  179. Character:FindFirstChildOfClass("Accessory"):Destroy()
  180. end
  181.  
  182. -- Removing C-clothes....
  183.  
  184. if Character:FindFirstChildOfClass("Shirt") then
  185. Character:FindFirstChildOfClass("Shirt"):Destroy()
  186. end
  187. if Character:FindFirstChildOfClass("Pants") then
  188. Character:FindFirstChildOfClass("Pants"):Destroy()
  189. end
  190. if Character:FindFirstChildOfClass("Shirt Graphic") then
  191. Character:FindFirstChildOfClass("Shirt Graphic"):Destroy()
  192. end
  193.  
  194. -- Machine parts
  195.  
  196. local MainPart = Instance.new("Part", Character)
  197. MainPart.Size = Vector3.new(3, 4.25, 3)
  198. MainPart.Material = Enum.Material.Metal
  199. MainPart.Anchored = true
  200. MainPart.CanCollide = true
  201. MainPart.BrickColor = BrickColor.new("Medium stone grey")
  202. MainPart.Position = Character.Torso.Position - Vector3.new(0, 0.85, 0)
  203.  
  204. local MainPartWeld = Instance.new("WeldConstraint")
  205. MainPartWeld.Part0 = MainPart
  206. MainPartWeld.Part1 = Character.Torso
  207. MainPartWeld.Parent = MainPart
  208. MainPart.Anchored = false
  209.  
  210.  
  211.  
  212.  
  213. local MainPart2 = Instance.new("Part", Character)
  214. MainPart2.Size = Vector3.new(0.09, 2.6, 2.66)
  215. MainPart2.Material = Enum.Material.Metal
  216. MainPart2.Anchored = true
  217. MainPart2.CanCollide = true
  218. MainPart2.BrickColor = BrickColor.new("Mid gray")
  219. MainPart2.Position = MainPart.Position + Vector3.new(1.545, 0.47, 0)
  220.  
  221. local MainPart2Weld = Instance.new("WeldConstraint")
  222. MainPart2Weld.Part0 = MainPart2
  223. MainPart2Weld.Part1 = MainPart
  224. MainPart2Weld.Parent = MainPart2
  225. MainPart2.Anchored = false
  226.  
  227.  
  228.  
  229.  
  230. local MainPart3 = Instance.new("Part", Character)
  231. MainPart3.Size = Vector3.new(0.25, 0.87, 1.48)
  232. MainPart3.Material = Enum.Material.Metal
  233. MainPart3.Anchored = true
  234. MainPart3.CanCollide = true
  235. MainPart3.BrickColor = BrickColor.new("Mid gray")
  236. MainPart3.Position = MainPart2.Position - Vector3.new(0, 1.90, 0)
  237.  
  238. local MainPart3Weld = Instance.new("WeldConstraint")
  239. MainPart3Weld.Part0 = MainPart3
  240. MainPart3Weld.Part1 = MainPart
  241. MainPart3Weld.Parent = MainPart3
  242. MainPart3.Anchored = false
  243.  
  244.  
  245.  
  246. local MainPart0 = Instance.new("Part", Character)
  247. MainPart0.Size = Vector3.new(0.57, 0.6, 1.12)
  248. MainPart0.Material = Enum.Material.Metal
  249. MainPart0.Anchored = true
  250. MainPart0.CanCollide = true
  251. MainPart0.Transparency = 1
  252. MainPart0.BrickColor = BrickColor.new("Bright green")
  253. MainPart0.Position = MainPart3.Position
  254.  
  255. local MainPart4Weld = Instance.new("WeldConstraint")
  256. MainPart4Weld.Part0 = MainPart0
  257. MainPart4Weld.Part1 = MainPart3
  258. MainPart4Weld.Parent = MainPart0
  259. MainPart0.Anchored = false
  260.  
  261.  
  262.  
  263. local MainPart5 = Instance.new("Part", Character)
  264. MainPart5.Size = Vector3.new(2.362, 0.25, 2.362)
  265. MainPart5.Material = Enum.Material.Metal
  266. MainPart5.Anchored = true
  267. MainPart5.CanCollide = false
  268. MainPart5.BrickColor = BrickColor.new("Smoky grey")
  269. MainPart5.Position = MainPart.Position + Vector3.new(0, 2.150, 0)
  270.  
  271. local MainPart5Weld = Instance.new("WeldConstraint")
  272. MainPart5Weld.Part0 = MainPart5
  273. MainPart5Weld.Part1 = MainPart
  274. MainPart5Weld.Parent = MainPart5
  275. MainPart5.Anchored = false
  276.  
  277.  
  278.  
  279.  
  280. local MainPart6 = Instance.new("Part", Character)
  281. MainPart6.Size = Vector3.new(2.062, 0.13, 2.063)
  282. MainPart6.Material = Enum.Material.Metal
  283. MainPart6.Anchored = true
  284. MainPart6.CanCollide = false
  285. MainPart6.BrickColor = BrickColor.new("Really black")
  286. MainPart6.Position = MainPart5.Position + Vector3.new(0, 0.13, 0)
  287.  
  288. local MainPart6Weld = Instance.new("WeldConstraint")
  289. MainPart6Weld.Part0 = MainPart6
  290. MainPart6Weld.Part1 = MainPart5
  291. MainPart6Weld.Parent = MainPart6
  292. MainPart6.Anchored = false
  293.  
  294.  
  295. local Name = Instance.new("SurfaceGui", MainPart2)
  296. Name.Face = "Right"
  297.  
  298. local Text = Instance.new("TextLabel", Name)
  299. Text.Text = "Buff Machine ------------------- by DarkSideYT123"
  300. Text.TextWrapped = true
  301. Text.Size = UDim2.new(0, 800,0, 600)
  302. Text.BackgroundTransparency = 1
  303. Text.TextSize = "100"
  304. Text.Font = Enum.Font.Cartoon
  305.  
  306.  
  307.  
  308.  
  309. while true do
  310. wait(1)
  311. if workspace:FindFirstChild("Buttonyt123") then
  312. MainPart4 = workspace:FindFirstChild("Buttonyt123")
  313. local CD = Instance.new("ClickDetector", MainPart4)
  314. CD.MaxActivationDistance = 50
  315. CD.MouseClick:Connect(function(Plr)
  316. if Machine == false then
  317. Machine = true
  318. MainPart4.BrickColor = BrickColor.new("Really red")
  319.  
  320. local Buff = Instance.new("Part", workspace)
  321. Buff.Size = Vector3.new(0.947, 0.98, 0.926)
  322. Buff.BrickColor = BrickColor.new("Bright green")
  323. Buff.Material = Enum.Material.Metal
  324. Buff.CanCollide = false
  325.  
  326. Buff.Position = MainPart6.Position + Vector3.new(0, 1, 0)
  327.  
  328. local ShinyEffect = Instance.new("ParticleEmitter", Buff)
  329. ShinyEffect.Texture = "rbxassetid://1084975295"
  330. ShinyEffect.Size = NumberSequence.new(2.5)
  331. ShinyEffect.LightEmission = 1
  332. ShinyEffect.LightEmission = 1
  333. ShinyEffect.Color = ColorSequence.new(Color3.new(255, 255, 255))
  334. ShinyEffect.Rate = 100
  335. ShinyEffect.Lifetime = NumberRange.new(0.1)
  336.  
  337. Buff.Velocity = Vector3.new(math.random(-50, 50), math.random(1, 50), math.random(-50, 50))
  338. Buff.Touched:Connect(function(s)
  339. if s.Material == Enum.Material.Grass then
  340. Buff.Anchored = true
  341. Buff.Position = Buff.Position + Vector3.new(0, 2, 0)
  342. end
  343. end)
  344.  
  345. Buff.Touched:Connect(function(Part)
  346. if Part.Parent:FindFirstChildOfClass("Humanoid") then
  347. if Part.Parent.Name == Player.Name then
  348.  
  349. else
  350. if Part.Parent:FindFirstChildOfClass("Humanoid").RigType == Enum.HumanoidRigType.R6 then
  351. Buff:Destroy()
  352. local Charar = Part.Parent
  353. if Charar:FindFirstChild("ChestPlate") then
  354. Type = 2
  355. else
  356. Type = 1
  357. end
  358. if Type == 1 then
  359.  
  360. if Charar:FindFirstChild("ChestPlate") then
  361. Charar.HumanoidRootPart.Anchored = false
  362. else
  363. Color = BrickColor.Random()
  364. MaterialNumber = math.random(1, 5)
  365. if MaterialNumber == 1 then
  366. Material = Enum.Material.WoodPlanks
  367. else
  368. if MaterialNumber == 2 then
  369. Material = Enum.Material.Pebble
  370. else
  371. if MaterialNumber == 3 then
  372. Material = Enum.Material.DiamondPlate
  373. else
  374. if MaterialNumber == 4 then
  375. Material = Enum.Material.Metal
  376. else
  377. if MaterialNumber == 5 then
  378. Material = Enum.Material.Neon
  379. end
  380. end
  381. end
  382. end
  383. end
  384.  
  385. Chestplate1 = Instance.new("Part", Charar)
  386. Chestplate1.Anchored = true
  387. Chestplate1.Material = Material
  388. Chestplate1.BrickColor = Color
  389. Chestplate1.Size = Vector3.new(1.1, 2.05, 2.05)
  390. Chestplate1.Position = Charar.Torso.Position
  391. Chestplate1.Orientation = Charar.Torso.Orientation + Vector3.new(0, 90, 0)
  392. Chestplate1.CanCollide = false
  393. Chestplate1.Name = "ChestPlate"
  394.  
  395. local Chestplate1Weld = Instance.new("WeldConstraint", Chestplate1)
  396. Chestplate1Weld.Part0 = Chestplate1
  397. Chestplate1Weld.Part1 = Charar.Torso
  398.  
  399. Chestplate2 = Instance.new("Part", Charar)
  400. Chestplate2.Anchored = true
  401. Chestplate2.Material = Material
  402. Chestplate2.BrickColor = Color
  403. Chestplate2.Size = Vector3.new(1.1, 1.05, 1.05)
  404. Chestplate2.CFrame = Charar["Right Arm"].CFrame * CFrame.new(0, 0.5, 0)
  405. Chestplate2.Orientation = Charar["Right Arm"].Orientation
  406. Chestplate2.CanCollide = false
  407.  
  408. local Chestplate2Weld = Instance.new("WeldConstraint", Chestplate2)
  409. Chestplate2Weld.Part0 = Chestplate2
  410. Chestplate2Weld.Part1 = Charar["Right Arm"]
  411.  
  412. Chestplate3 = Instance.new("Part", Charar)
  413. Chestplate3.Anchored = true
  414. Chestplate3.Material = Material
  415. Chestplate3.BrickColor = Color
  416. Chestplate3.Size = Vector3.new(1.1, 1.05, 1.05)
  417. Chestplate3.CFrame = Charar["Left Arm"].CFrame * CFrame.new(0, 0.5, 0)
  418. Chestplate3.Orientation = Charar["Left Arm"].Orientation
  419. Chestplate3.CanCollide = false
  420.  
  421. local Chestplate3Weld = Instance.new("WeldConstraint", Chestplate3)
  422. Chestplate3Weld.Part0 = Chestplate3
  423. Chestplate3Weld.Part1 = Charar["Left Arm"]
  424.  
  425. Charar.Torso.Anchored = false
  426. Chestplate1.Anchored = false
  427. Chestplate2.Anchored = false
  428. Chestplate3.Anchored = false
  429.  
  430. Charar.Humanoid.MaxHealth = 150
  431. Charar.Humanoid.Health = 150
  432. Charar.Humanoid.HealthChanged:Connect(function(health)
  433. if health <= 125 then
  434. Chestplate1.Material = Enum.Material.CorrodedMetal
  435. Chestplate2.Material = Enum.Material.CorrodedMetal
  436. Chestplate3.Material = Enum.Material.CorrodedMetal
  437. Charar.Humanoid.MaxHealth = Charar.Humanoid.Health
  438. end
  439. end)
  440.  
  441. Charar.Humanoid.HealthChanged:Connect(function(health)
  442. if health <= 100 then
  443. Chestplate1:Destroy()
  444. Chestplate2:Destroy()
  445. Chestplate3:Destroy()
  446. Charar.Humanoid.MaxHealth = Charar.Humanoid.Health
  447. end
  448. end)
  449. end
  450. else
  451. if Type == 2 then
  452. Chestplate1.Material = Material
  453. Chestplate2.Material = Material
  454. Chestplate3.Material = Material
  455. Charar.Humanoid.MaxHealth = 200
  456. Charar.Humanoid.Health = 200
  457.  
  458. local Boot1 = Instance.new("Part", Charar)
  459. Boot1.Material = Charar.ChestPlate.Material
  460. Boot1.Size = Vector3.new(1.1, 1.05, 1.05)
  461. Boot1.Anchored = true
  462. Boot1.CanCollide = false
  463. Boot1.CFrame = Charar["Right Leg"].CFrame * CFrame.new(0, -0.5, 0)
  464. Boot1.Orientation = Charar["Right Leg"].Orientation
  465.  
  466. local Boot1Weld = Instance.new("WeldConstraint", Boot1)
  467. Boot1Weld.Part0 = Boot1
  468. Boot1Weld.Part1 = Charar["Right Leg"]
  469.  
  470. local Boot2 = Instance.new("Part", Charar)
  471. Boot2.Material = Charar.ChestPlate.Material
  472. Boot2.Size = Vector3.new(1.1, 1.05, 1.05)
  473. Boot2.Anchored = true
  474. Boot2.CanCollide = false
  475. Boot2.CFrame = Charar["Left Leg"].CFrame * CFrame.new(0, -0.5, 0)
  476. Boot2.Orientation = Charar["Left Leg"].Orientation
  477.  
  478. local Boot2Weld = Instance.new("WeldConstraint", Boot2)
  479. Boot2Weld.Part0 = Boot2
  480. Boot2Weld.Part1 = Charar["Left Leg"]
  481.  
  482. Boot1.BrickColor = Charar.ChestPlate.BrickColor
  483. Boot2.BrickColor = Charar.ChestPlate.BrickColor
  484.  
  485. Boot1.Anchored = false
  486. Boot2.Anchored = false
  487.  
  488. Charar.Humanoid.HealthChanged:Connect(function(health)
  489. if health <= 175 then
  490. Boot2.Material = Enum.Material.CorrodedMetal
  491. Boot1.Material = Enum.Material.CorrodedMetal
  492. Charar.Humanoid.MaxHealth = Charar.Humanoid.Health
  493. end
  494. end)
  495.  
  496. Charar.Humanoid.HealthChanged:Connect(function(health)
  497. if health <= 150 then
  498. Boot2:Destroy()
  499. Boot1:Destroy()
  500. Charar.Humanoid.MaxHealth = Charar.Humanoid.Health
  501. end
  502. end)
  503.  
  504. Charar.Humanoid.HealthChanged:Connect(function(health)
  505. if health <= 125 then
  506. Chestplate1.Material = Enum.Material.CorrodedMetal
  507. Chestplate2.Material = Enum.Material.CorrodedMetal
  508. Chestplate3.Material = Enum.Material.CorrodedMetal
  509. Charar.Humanoid.MaxHealth = Charar.Humanoid.Health
  510. end
  511. end)
  512.  
  513. Charar.Humanoid.HealthChanged:Connect(function(health)
  514. if health <= 100 then
  515. Chestplate1:Destroy()
  516. Chestplate2:Destroy()
  517. Chestplate3:Destroy()
  518. Charar.Humanoid.MaxHealth = Charar.Humanoid.Health
  519. end
  520. end)
  521.  
  522. else
  523. if Type == 3 then
  524. print("Ded")
  525. end
  526. end
  527. end
  528. else
  529.  
  530. end
  531. end
  532. end
  533. end)
  534.  
  535. else
  536. Machine = false
  537. MainPart4.BrickColor = BrickColor.new("Bright green")
  538. end
  539. end)
  540. else
  541. local MainPart4 = Instance.new("Part", workspace)
  542. MainPart4.Size = Vector3.new(0.57, 0.6, 1.12)
  543. MainPart4.Material = Enum.Material.Metal
  544. MainPart4.Anchored = true
  545. MainPart4.CanCollide = true
  546. MainPart4.Name = "Buttonyt123"
  547. MainPart4.BrickColor = BrickColor.new("Bright green")
  548. MainPart4.Orientation = MainPart0.Orientation
  549. MainPart4.Position = MainPart0.Position
  550.  
  551. local MainPart4Weld = Instance.new("WeldConstraint")
  552. MainPart4Weld.Part0 = MainPart4
  553. MainPart4Weld.Part1 = MainPart3
  554. MainPart4Weld.Parent = MainPart4
  555. MainPart4.Anchored = false
  556. end
  557. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement