Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,game,owner = owner,game
- local RealPlayer = Player
- do
- print("FE Compatibility code by Mokiros")
- local rp = RealPlayer
- script.Parent = rp.Character
- --RemoteEvent for communicating
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- --Fake event to make stuff like Mouse.KeyDown work
- local function fakeEvent()
- local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
- t.connect = t.Connect
- return t
- end
- --Creating fake input objects with fake variables
- local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
- local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
- local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
- CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
- end}
- --Merged 2 functions into one by checking amount of arguments
- CAS.UnbindAction = CAS.BindAction
- --This function will trigger the events that have been :Connect()'ed
- local function te(self,ev,...)
- local t = m[ev]
- if t and t._fakeEvent then
- for _,f in pairs(t.Functions) do
- f(...)
- end
- end
- end
- m.TrigEvent = te
- UIS.TrigEvent = te
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=rp then return end
- m.Target = io.Target
- m.Hit = io.Hit
- if not io.isMouse then
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return m:TrigEvent(b and "Button1Down" or "Button1Up")
- end
- for _,t in pairs(CAS.Actions) do
- for _,k in pairs(t.Keys) do
- if k==io.KeyCode then
- t.Function(t.Name,io.UserInputState,io)
- end
- end
- end
- m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[
- local Player = game:GetService("Players").LocalPlayer
- local Event = script:WaitForChild("UserInput_Event")
- local Mouse = Player:GetMouse()
- local UIS = game:GetService("UserInputService")
- local input = function(io,a)
- if a then return end
- --Since InputObject is a client-side instance, we create and pass table instead
- Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local h,t
- --Give the server mouse data 30 times every second, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- while wait(1/30) do
- if h~=Mouse.Hit or t~=Mouse.Target then
- h,t=Mouse.Hit,Mouse.Target
- Event:FireServer({isMouse=true,Target=t,Hit=h})
- end
- end]==],Player.Character)
- ----Sandboxed game object that allows the usage of client-side methods and services
- --Real game object
- local _rg = game
- --Metatable for fake service
- local fsmt = {
- __index = function(self,k)
- local s = rawget(self,"_RealService")
- if s then return s[k] end
- end,
- __newindex = function(self,k,v)
- local s = rawget(self,"_RealService")
- if s then s[k]=v end
- end,
- __call = function(self,...)
- local s = rawget(self,"_RealService")
- if s then return s(...) end
- end
- }
- local function FakeService(t,RealService)
- t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
- return setmetatable(t,fsmt)
- end
- --Fake game object
- local g = {
- GetService = function(self,s)
- return self[s]
- end,
- Players = FakeService({
- LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
- },"Players"),
- UserInputService = FakeService(UIS,"UserInputService"),
- ContextActionService = FakeService(CAS,"ContextActionService"),
- }
- rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
- g.service = g.GetService
- g.RunService = FakeService({
- RenderStepped = _rg:GetService("RunService").Heartbeat,
- BindToRenderStep = function(self,name,_,fun)
- end,
- UnbindFromRenderStep = function(self,name)
- self._btrs[name]:Disconnect()
- end,
- },"RunService")
- setmetatable(g,{
- __index=function(self,s)
- return _rg:GetService(s) or typeof(_rg[s])=="function"
- and function(_,...)return _rg[s](_rg,...)end or _rg[s]
- end,
- __newindex = fsmt.__newindex,
- __call = fsmt.__call
- })
- --Changing owner to fake player object to support owner:GetMouse()
- game,owner = g,g.Players.LocalPlayer
- end
- wait(1)
- --==< A script made by DarkSideYT123
- print("Script by DarkSideYT123")
- local Player = game.Players.LocalPlayer
- local Character = Player.Character
- Character["Right Arm"].Transparency = 1
- Character["Right Leg"].Transparency = 1
- Character["Left Arm"].Transparency = 1
- Character["Left Leg"].Transparency = 1
- Character["Head"].Transparency = 1
- Character["Torso"].Transparency = 1
- Character["Head"].face.Transparency = 1
- Machine = false
- print("Controls:")
- Character.Archivable = true
- -- Removing Accessories
- if Character:FindFirstChildOfClass("Accessory") then
- Character:FindFirstChildOfClass("Accessory"):Destroy()
- end
- if Character:FindFirstChildOfClass("Accessory") then
- Character:FindFirstChildOfClass("Accessory"):Destroy()
- end
- if Character:FindFirstChildOfClass("Accessory") then
- Character:FindFirstChildOfClass("Accessory"):Destroy()
- end
- if Character:FindFirstChildOfClass("Accessory") then
- Character:FindFirstChildOfClass("Accessory"):Destroy()
- end
- if Character:FindFirstChildOfClass("Accessory") then
- Character:FindFirstChildOfClass("Accessory"):Destroy()
- end
- -- Removing C-clothes....
- if Character:FindFirstChildOfClass("Shirt") then
- Character:FindFirstChildOfClass("Shirt"):Destroy()
- end
- if Character:FindFirstChildOfClass("Pants") then
- Character:FindFirstChildOfClass("Pants"):Destroy()
- end
- if Character:FindFirstChildOfClass("Shirt Graphic") then
- Character:FindFirstChildOfClass("Shirt Graphic"):Destroy()
- end
- -- Machine parts
- local MainPart = Instance.new("Part", Character)
- MainPart.Size = Vector3.new(3, 4.25, 3)
- MainPart.Material = Enum.Material.Metal
- MainPart.Anchored = true
- MainPart.CanCollide = true
- MainPart.BrickColor = BrickColor.new("Medium stone grey")
- MainPart.Position = Character.Torso.Position - Vector3.new(0, 0.85, 0)
- local MainPartWeld = Instance.new("WeldConstraint")
- MainPartWeld.Part0 = MainPart
- MainPartWeld.Part1 = Character.Torso
- MainPartWeld.Parent = MainPart
- MainPart.Anchored = false
- local MainPart2 = Instance.new("Part", Character)
- MainPart2.Size = Vector3.new(0.09, 2.6, 2.66)
- MainPart2.Material = Enum.Material.Metal
- MainPart2.Anchored = true
- MainPart2.CanCollide = true
- MainPart2.BrickColor = BrickColor.new("Mid gray")
- MainPart2.Position = MainPart.Position + Vector3.new(1.545, 0.47, 0)
- local MainPart2Weld = Instance.new("WeldConstraint")
- MainPart2Weld.Part0 = MainPart2
- MainPart2Weld.Part1 = MainPart
- MainPart2Weld.Parent = MainPart2
- MainPart2.Anchored = false
- local MainPart3 = Instance.new("Part", Character)
- MainPart3.Size = Vector3.new(0.25, 0.87, 1.48)
- MainPart3.Material = Enum.Material.Metal
- MainPart3.Anchored = true
- MainPart3.CanCollide = true
- MainPart3.BrickColor = BrickColor.new("Mid gray")
- MainPart3.Position = MainPart2.Position - Vector3.new(0, 1.90, 0)
- local MainPart3Weld = Instance.new("WeldConstraint")
- MainPart3Weld.Part0 = MainPart3
- MainPart3Weld.Part1 = MainPart
- MainPart3Weld.Parent = MainPart3
- MainPart3.Anchored = false
- local MainPart0 = Instance.new("Part", Character)
- MainPart0.Size = Vector3.new(0.57, 0.6, 1.12)
- MainPart0.Material = Enum.Material.Metal
- MainPart0.Anchored = true
- MainPart0.CanCollide = true
- MainPart0.Transparency = 1
- MainPart0.BrickColor = BrickColor.new("Bright green")
- MainPart0.Position = MainPart3.Position
- local MainPart4Weld = Instance.new("WeldConstraint")
- MainPart4Weld.Part0 = MainPart0
- MainPart4Weld.Part1 = MainPart3
- MainPart4Weld.Parent = MainPart0
- MainPart0.Anchored = false
- local MainPart5 = Instance.new("Part", Character)
- MainPart5.Size = Vector3.new(2.362, 0.25, 2.362)
- MainPart5.Material = Enum.Material.Metal
- MainPart5.Anchored = true
- MainPart5.CanCollide = false
- MainPart5.BrickColor = BrickColor.new("Smoky grey")
- MainPart5.Position = MainPart.Position + Vector3.new(0, 2.150, 0)
- local MainPart5Weld = Instance.new("WeldConstraint")
- MainPart5Weld.Part0 = MainPart5
- MainPart5Weld.Part1 = MainPart
- MainPart5Weld.Parent = MainPart5
- MainPart5.Anchored = false
- local MainPart6 = Instance.new("Part", Character)
- MainPart6.Size = Vector3.new(2.062, 0.13, 2.063)
- MainPart6.Material = Enum.Material.Metal
- MainPart6.Anchored = true
- MainPart6.CanCollide = false
- MainPart6.BrickColor = BrickColor.new("Really black")
- MainPart6.Position = MainPart5.Position + Vector3.new(0, 0.13, 0)
- local MainPart6Weld = Instance.new("WeldConstraint")
- MainPart6Weld.Part0 = MainPart6
- MainPart6Weld.Part1 = MainPart5
- MainPart6Weld.Parent = MainPart6
- MainPart6.Anchored = false
- local Name = Instance.new("SurfaceGui", MainPart2)
- Name.Face = "Right"
- local Text = Instance.new("TextLabel", Name)
- Text.Text = "Buff Machine ------------------- by DarkSideYT123"
- Text.TextWrapped = true
- Text.Size = UDim2.new(0, 800,0, 600)
- Text.BackgroundTransparency = 1
- Text.TextSize = "100"
- Text.Font = Enum.Font.Cartoon
- while true do
- wait(1)
- if workspace:FindFirstChild("Buttonyt123") then
- MainPart4 = workspace:FindFirstChild("Buttonyt123")
- local CD = Instance.new("ClickDetector", MainPart4)
- CD.MaxActivationDistance = 50
- CD.MouseClick:Connect(function(Plr)
- if Machine == false then
- Machine = true
- MainPart4.BrickColor = BrickColor.new("Really red")
- local Buff = Instance.new("Part", workspace)
- Buff.Size = Vector3.new(0.947, 0.98, 0.926)
- Buff.BrickColor = BrickColor.new("Bright green")
- Buff.Material = Enum.Material.Metal
- Buff.CanCollide = false
- Buff.Position = MainPart6.Position + Vector3.new(0, 1, 0)
- local ShinyEffect = Instance.new("ParticleEmitter", Buff)
- ShinyEffect.Texture = "rbxassetid://1084975295"
- ShinyEffect.Size = NumberSequence.new(2.5)
- ShinyEffect.LightEmission = 1
- ShinyEffect.LightEmission = 1
- ShinyEffect.Color = ColorSequence.new(Color3.new(255, 255, 255))
- ShinyEffect.Rate = 100
- ShinyEffect.Lifetime = NumberRange.new(0.1)
- Buff.Velocity = Vector3.new(math.random(-50, 50), math.random(1, 50), math.random(-50, 50))
- Buff.Touched:Connect(function(s)
- if s.Material == Enum.Material.Grass then
- Buff.Anchored = true
- Buff.Position = Buff.Position + Vector3.new(0, 2, 0)
- end
- end)
- Buff.Touched:Connect(function(Part)
- if Part.Parent:FindFirstChildOfClass("Humanoid") then
- if Part.Parent.Name == Player.Name then
- else
- if Part.Parent:FindFirstChildOfClass("Humanoid").RigType == Enum.HumanoidRigType.R6 then
- Buff:Destroy()
- local Charar = Part.Parent
- if Charar:FindFirstChild("ChestPlate") then
- Type = 2
- else
- Type = 1
- end
- if Type == 1 then
- if Charar:FindFirstChild("ChestPlate") then
- Charar.HumanoidRootPart.Anchored = false
- else
- Color = BrickColor.Random()
- MaterialNumber = math.random(1, 5)
- if MaterialNumber == 1 then
- Material = Enum.Material.WoodPlanks
- else
- if MaterialNumber == 2 then
- Material = Enum.Material.Pebble
- else
- if MaterialNumber == 3 then
- Material = Enum.Material.DiamondPlate
- else
- if MaterialNumber == 4 then
- Material = Enum.Material.Metal
- else
- if MaterialNumber == 5 then
- Material = Enum.Material.Neon
- end
- end
- end
- end
- end
- Chestplate1 = Instance.new("Part", Charar)
- Chestplate1.Anchored = true
- Chestplate1.Material = Material
- Chestplate1.BrickColor = Color
- Chestplate1.Size = Vector3.new(1.1, 2.05, 2.05)
- Chestplate1.Position = Charar.Torso.Position
- Chestplate1.Orientation = Charar.Torso.Orientation + Vector3.new(0, 90, 0)
- Chestplate1.CanCollide = false
- Chestplate1.Name = "ChestPlate"
- local Chestplate1Weld = Instance.new("WeldConstraint", Chestplate1)
- Chestplate1Weld.Part0 = Chestplate1
- Chestplate1Weld.Part1 = Charar.Torso
- Chestplate2 = Instance.new("Part", Charar)
- Chestplate2.Anchored = true
- Chestplate2.Material = Material
- Chestplate2.BrickColor = Color
- Chestplate2.Size = Vector3.new(1.1, 1.05, 1.05)
- Chestplate2.CFrame = Charar["Right Arm"].CFrame * CFrame.new(0, 0.5, 0)
- Chestplate2.Orientation = Charar["Right Arm"].Orientation
- Chestplate2.CanCollide = false
- local Chestplate2Weld = Instance.new("WeldConstraint", Chestplate2)
- Chestplate2Weld.Part0 = Chestplate2
- Chestplate2Weld.Part1 = Charar["Right Arm"]
- Chestplate3 = Instance.new("Part", Charar)
- Chestplate3.Anchored = true
- Chestplate3.Material = Material
- Chestplate3.BrickColor = Color
- Chestplate3.Size = Vector3.new(1.1, 1.05, 1.05)
- Chestplate3.CFrame = Charar["Left Arm"].CFrame * CFrame.new(0, 0.5, 0)
- Chestplate3.Orientation = Charar["Left Arm"].Orientation
- Chestplate3.CanCollide = false
- local Chestplate3Weld = Instance.new("WeldConstraint", Chestplate3)
- Chestplate3Weld.Part0 = Chestplate3
- Chestplate3Weld.Part1 = Charar["Left Arm"]
- Charar.Torso.Anchored = false
- Chestplate1.Anchored = false
- Chestplate2.Anchored = false
- Chestplate3.Anchored = false
- Charar.Humanoid.MaxHealth = 150
- Charar.Humanoid.Health = 150
- Charar.Humanoid.HealthChanged:Connect(function(health)
- if health <= 125 then
- Chestplate1.Material = Enum.Material.CorrodedMetal
- Chestplate2.Material = Enum.Material.CorrodedMetal
- Chestplate3.Material = Enum.Material.CorrodedMetal
- Charar.Humanoid.MaxHealth = Charar.Humanoid.Health
- end
- end)
- Charar.Humanoid.HealthChanged:Connect(function(health)
- if health <= 100 then
- Chestplate1:Destroy()
- Chestplate2:Destroy()
- Chestplate3:Destroy()
- Charar.Humanoid.MaxHealth = Charar.Humanoid.Health
- end
- end)
- end
- else
- if Type == 2 then
- Chestplate1.Material = Material
- Chestplate2.Material = Material
- Chestplate3.Material = Material
- Charar.Humanoid.MaxHealth = 200
- Charar.Humanoid.Health = 200
- local Boot1 = Instance.new("Part", Charar)
- Boot1.Material = Charar.ChestPlate.Material
- Boot1.Size = Vector3.new(1.1, 1.05, 1.05)
- Boot1.Anchored = true
- Boot1.CanCollide = false
- Boot1.CFrame = Charar["Right Leg"].CFrame * CFrame.new(0, -0.5, 0)
- Boot1.Orientation = Charar["Right Leg"].Orientation
- local Boot1Weld = Instance.new("WeldConstraint", Boot1)
- Boot1Weld.Part0 = Boot1
- Boot1Weld.Part1 = Charar["Right Leg"]
- local Boot2 = Instance.new("Part", Charar)
- Boot2.Material = Charar.ChestPlate.Material
- Boot2.Size = Vector3.new(1.1, 1.05, 1.05)
- Boot2.Anchored = true
- Boot2.CanCollide = false
- Boot2.CFrame = Charar["Left Leg"].CFrame * CFrame.new(0, -0.5, 0)
- Boot2.Orientation = Charar["Left Leg"].Orientation
- local Boot2Weld = Instance.new("WeldConstraint", Boot2)
- Boot2Weld.Part0 = Boot2
- Boot2Weld.Part1 = Charar["Left Leg"]
- Boot1.BrickColor = Charar.ChestPlate.BrickColor
- Boot2.BrickColor = Charar.ChestPlate.BrickColor
- Boot1.Anchored = false
- Boot2.Anchored = false
- Charar.Humanoid.HealthChanged:Connect(function(health)
- if health <= 175 then
- Boot2.Material = Enum.Material.CorrodedMetal
- Boot1.Material = Enum.Material.CorrodedMetal
- Charar.Humanoid.MaxHealth = Charar.Humanoid.Health
- end
- end)
- Charar.Humanoid.HealthChanged:Connect(function(health)
- if health <= 150 then
- Boot2:Destroy()
- Boot1:Destroy()
- Charar.Humanoid.MaxHealth = Charar.Humanoid.Health
- end
- end)
- Charar.Humanoid.HealthChanged:Connect(function(health)
- if health <= 125 then
- Chestplate1.Material = Enum.Material.CorrodedMetal
- Chestplate2.Material = Enum.Material.CorrodedMetal
- Chestplate3.Material = Enum.Material.CorrodedMetal
- Charar.Humanoid.MaxHealth = Charar.Humanoid.Health
- end
- end)
- Charar.Humanoid.HealthChanged:Connect(function(health)
- if health <= 100 then
- Chestplate1:Destroy()
- Chestplate2:Destroy()
- Chestplate3:Destroy()
- Charar.Humanoid.MaxHealth = Charar.Humanoid.Health
- end
- end)
- else
- if Type == 3 then
- print("Ded")
- end
- end
- end
- else
- end
- end
- end
- end)
- else
- Machine = false
- MainPart4.BrickColor = BrickColor.new("Bright green")
- end
- end)
- else
- local MainPart4 = Instance.new("Part", workspace)
- MainPart4.Size = Vector3.new(0.57, 0.6, 1.12)
- MainPart4.Material = Enum.Material.Metal
- MainPart4.Anchored = true
- MainPart4.CanCollide = true
- MainPart4.Name = "Buttonyt123"
- MainPart4.BrickColor = BrickColor.new("Bright green")
- MainPart4.Orientation = MainPart0.Orientation
- MainPart4.Position = MainPart0.Position
- local MainPart4Weld = Instance.new("WeldConstraint")
- MainPart4Weld.Part0 = MainPart4
- MainPart4Weld.Part1 = MainPart3
- MainPart4Weld.Parent = MainPart4
- MainPart4.Anchored = false
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement