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(),Button2Up=fakeEvent(),Button2Down=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
- if io.UserInputType == Enum.UserInputType.MouseButton2 then
- return m:TrigEvent(b and "Button2Down" or "Button2Up")
- 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 typeof(s[k])=="function"
- and function(_,...)return s[k](s,...)end or s[k]
- end
- end,
- __newindex = function(self,k,v)
- local s = rawget(self,"_RealService")
- if s then s[k]=v 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 rawget(self,s) or _rg:GetService(s)
- end,
- Players = FakeService({
- LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
- },"Players"),
- UserInputService = FakeService(UIS,"UserInputService"),
- ContextActionService = FakeService(CAS,"ContextActionService"),
- RunService = FakeService({
- _btrs = {},
- RenderStepped = _rg:GetService("RunService").Heartbeat,
- BindToRenderStep = function(self,name,_,fun)
- self._btrs[name] = self.Heartbeat:Connect(fun)
- end,
- UnbindFromRenderStep = function(self,name)
- self._btrs[name]:Disconnect()
- end,
- },"RunService")
- }
- rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
- g.service = g.GetService
- FakeService(g,game)
- --Changing owner to fake player object to support owner:GetMouse()
- game,owner = g,g.Players.LocalPlayer
- end
- function terraform(victim)
- function lerp(a,start,part1,part2,dag)
- coroutine.resume(coroutine.create(function()
- while wait() do
- part1.CFrame = part1.CFrame:Lerp(part2.CFrame,0.27)
- a.Size = Vector3.new(part1.CFrame.X,part1.CFrame.Y,part1.CFrame.Z)
- a.CFrame = a.CFrame:Lerp(dag.CFrame,0.27)
- end
- end))
- end
- mas = workspace
- Model0 = Instance.new("Model")
- Part1 = Instance.new("Part")
- Part2 = Instance.new("Part")
- Weld3 = Instance.new("Weld")
- CFrameValue4 = Instance.new("CFrameValue")
- Part5 = Instance.new("Part")
- Weld6 = Instance.new("Weld")
- CFrameValue7 = Instance.new("CFrameValue")
- Part8 = Instance.new("Part")
- Weld9 = Instance.new("Weld")
- CFrameValue10 = Instance.new("CFrameValue")
- Part11 = Instance.new("Part")
- Weld12 = Instance.new("Weld")
- CFrameValue13 = Instance.new("CFrameValue")
- Part14 = Instance.new("Part")
- Weld15 = Instance.new("Weld")
- CFrameValue16 = Instance.new("CFrameValue")
- Part17 = Instance.new("Part")
- Weld18 = Instance.new("Weld")
- CFrameValue19 = Instance.new("CFrameValue")
- Model0.Name = "parta"
- Model0.Parent = mas
- Part1.Name = "Head"
- Part1.Parent = Model0
- Part1.CFrame = CFrame.new(31.5, 1.80003285, 27.0000076, 1, -3.84727355e-06, -5.72111094e-06, 3.84736677e-06, 1, 1.62615397e-05, 5.72104818e-06, -1.62615615e-05, 1)
- Part1.Position = Vector3.new(31.5, 1.80003285, 27.0000076)
- Part1.Transparency = 1
- Part1.Size = Vector3.new(1, 1.20000005, 2)
- Part1.CanCollide = false
- Part2.Name = "Torso"
- Part2.Parent = Model0
- Part2.CFrame = CFrame.new(30.5, 1.80002904, 27.0000019, 1, -3.84727355e-06, -5.72111094e-06, 3.84736677e-06, 1, 1.62615397e-05, 5.72104818e-06, -1.62615615e-05, 1)
- Part2.Position = Vector3.new(30.5, 1.80002904, 27.0000019)
- Part2.Transparency = 1
- Part2.Size = Vector3.new(1, 1.20000005, 2)
- Part2.CanCollide = false
- Weld3.Name = "qCFrameWeldThingy"
- Weld3.Parent = Part2
- Weld3.C1 = CFrame.new(1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld3.Part0 = Part1
- Weld3.Part1 = Part2
- Weld3.part1 = Part2
- CFrameValue4.Name = "qRelativeCFrameWeldValue"
- CFrameValue4.Parent = Part2
- CFrameValue4.Value = CFrame.new(1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part5.Name = "Right Arm"
- Part5.Parent = Model0
- Part5.CFrame = CFrame.new(29.4999962, 1.80003333, 27.4999962, 1, -3.84727355e-06, -5.72111094e-06, 3.84736677e-06, 1, 1.62615397e-05, 5.72104818e-06, -1.62615615e-05, 1)
- Part5.Position = Vector3.new(29.4999962, 1.80003333, 27.4999962)
- Part5.Transparency = 1
- Part5.Size = Vector3.new(1, 1.20000005, 1)
- Part5.CanCollide = false
- Weld6.Name = "qCFrameWeldThingy"
- Weld6.Parent = Part5
- Weld6.C1 = CFrame.new(2, 0, -0.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld6.Part0 = Part1
- Weld6.Part1 = Part5
- Weld6.part1 = Part5
- CFrameValue7.Name = "qRelativeCFrameWeldValue"
- CFrameValue7.Parent = Part5
- CFrameValue7.Value = CFrame.new(2, 0, -0.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part8.Name = "Left Arm"
- Part8.Parent = Model0
- Part8.CFrame = CFrame.new(29.5000038, 1.800017, 26.4999962, 1, -3.84727355e-06, -5.72111094e-06, 3.84736677e-06, 1, 1.62615397e-05, 5.72104818e-06, -1.62615615e-05, 1)
- Part8.Position = Vector3.new(29.5000038, 1.800017, 26.4999962)
- Part8.Transparency = 1
- Part8.Size = Vector3.new(1, 1.20000005, 1)
- Part8.CanCollide = false
- Weld9.Name = "qCFrameWeldThingy"
- Weld9.Parent = Part8
- Weld9.C1 = CFrame.new(2, 0, 0.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld9.Part0 = Part1
- Weld9.Part1 = Part8
- Weld9.part1 = Part8
- CFrameValue10.Name = "qRelativeCFrameWeldValue"
- CFrameValue10.Parent = Part8
- CFrameValue10.Value = CFrame.new(2, 0, 0.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part11.Name = "Right Leg"
- Part11.Parent = Model0
- Part11.CFrame = CFrame.new(28.4999962, 1.8000294, 27.4999905, 1, -3.84727355e-06, -5.72111094e-06, 3.84736677e-06, 1, 1.62615397e-05, 5.72104818e-06, -1.62615615e-05, 1)
- Part11.Position = Vector3.new(28.4999962, 1.8000294, 27.4999905)
- Part11.Transparency = 1
- Part11.Size = Vector3.new(1, 1.20000005, 1)
- Part11.CanCollide = false
- Weld12.Name = "qCFrameWeldThingy"
- Weld12.Parent = Part11
- Weld12.C1 = CFrame.new(3, 0, -0.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld12.Part0 = Part1
- Weld12.Part1 = Part11
- Weld12.part1 = Part11
- CFrameValue13.Name = "qRelativeCFrameWeldValue"
- CFrameValue13.Parent = Part11
- CFrameValue13.Value = CFrame.new(3, 0, -0.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part14.Name = "Left Leg"
- Part14.Parent = Model0
- Part14.CFrame = CFrame.new(28.5000038, 1.80001318, 26.4999905, 1, -3.84727355e-06, -5.72111094e-06, 3.84736677e-06, 1, 1.62615397e-05, 5.72104818e-06, -1.62615615e-05, 1)
- Part14.Position = Vector3.new(28.5000038, 1.80001318, 26.4999905)
- Part14.Transparency = 1
- Part14.Size = Vector3.new(1, 1.20000005, 1)
- Part14.CanCollide = false
- Weld15.Name = "qCFrameWeldThingy"
- Weld15.Parent = Part14
- Weld15.C1 = CFrame.new(3, 0, 0.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld15.Part0 = Part1
- Weld15.Part1 = Part14
- Weld15.part1 = Part14
- CFrameValue16.Name = "qRelativeCFrameWeldValue"
- CFrameValue16.Parent = Part14
- CFrameValue16.Value = CFrame.new(3, 0, 0.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part17.Name = "goibonfdnd"
- Part17.Parent = Model0
- Part17.CFrame = CFrame.new(30, 1.80002713, 27, 1, -3.84727355e-06, -5.72111094e-06, 3.84736677e-06, 1, 1.62615397e-05, 5.72104818e-06, -1.62615615e-05, 1)
- Part17.Position = Vector3.new(30, 1.80002713, 27)
- Part17.Transparency = 1
- Part17.Size = Vector3.new(2, 1.20000005, 2)
- Part17.Anchored = true
- Part17.CanCollide = false
- Weld18.Name = "qCFrameWeldThingy"
- Weld18.Parent = Part17
- Weld18.C1 = CFrame.new(1.5, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld18.Part0 = Part1
- Weld18.Part1 = Part17
- Weld18.part1 = Part17
- CFrameValue19.Name = "qRelativeCFrameWeldValue"
- CFrameValue19.Parent = Part17
- CFrameValue19.Value = CFrame.new(1.5, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- char = victim
- barta = Model0
- for i,v in pairs(victim:GetDescendants()) do
- if v.ClassName == "Sound" then
- v:Destroy()
- end
- end
- Sound0 = Instance.new("Sound")
- Sound0.Name = "Oof Sound"
- Sound0.Parent = char.Head
- Sound0.SoundId = "rbxassetid://5159450402"
- Sound0.Volume = 1
- Sound0:Play()
- coroutine.resume(coroutine.create(function()
- for i = 0, 27 do
- Sound0.PlaybackSpeed = Sound0.PlaybackSpeed - 0.1
- wait(0.1)
- end
- end))
- Part17.CFrame = char.Head.CFrame * CFrame.new(0,-3.9,0)
- for i,v in pairs(char:GetChildren()) do
- if v.ClassName == "Part" then
- for i,b in pairs(barta:GetChildren()) do
- if b.Name == v.Name then
- local para = Instance.new("Part")
- para.Position = Vector3.new(v.Size.X,v.Size.Y,v.Size.Z)
- para.Size = Vector3.new(para.CFrame.X,para.CFrame.Y,para.CFrame.Z)
- local para2 = Instance.new("Part")
- para2.Position = Vector3.new(b.Size.X,b.Size.Y,b.Size.Z)
- para2.Size = Vector3.new(para2.CFrame.X,para2.CFrame.Y,para2.CFrame.Z)
- local A = para.CFrame
- X = b.Size.X
- Y =b.Size.Y
- Z = b.Size.Z
- for i,v in pairs(v:GetChildren()) do
- if v.Name ~= "Oof Sound" then
- v:Destroy()
- end
- end
- --Instance.new("BlockMesh",v)
- v.Parent = workspace
- v.Anchored = true
- v.Name = "Part"
- v.BottomSurface = "Inlet"--Enum.SurfaceType.Inlet
- v.TopSurface = "Studs"
- v.CanCollide = false
- v:BreakJoints()
- lerp(v,A,para,para2,b)
- local tweenInfo = TweenInfo.new(
- 0.27,
- Enum.EasingStyle.Linear,
- Enum.EasingDirection.In,
- 0,
- false
- )
- -- anim.KeyframeReached:Connect(function(keyframeName)
- -- if keyframeName == "Zombify" then
- tweenService = game:GetService("TweenService")
- local tween = tweenService:Create(v, tweenInfo, { Color = Color3.fromRGB(163, 162, 165) })
- tween:Play()
- end
- end
- end
- end
- end
- mouse = game.Players.LocalPlayer:GetMouse()
- mouse.Button1Down:Connect(function()
- --torso.Velocity = torso.Velocity + Vector3.new(0,40,0) *10
- if mouse.Target.Parent ~= nil and mouse.Target.Parent:FindFirstChildOfClass("Humanoid") ~= nil then
- terraform(mouse.Target.Parent)
- end
- end)
Add Comment
Please, Sign In to add comment