Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- This script has been converted to FE by iPxter
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,Mouse,mouse,UserInputService,ContextActionService = owner
- do
- print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
- script.Parent = Player.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,Connect=function(self,f)self.Function=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 and t.Function then
- t.Function(...)
- end
- end
- m.TrigEvent = te
- UIS.TrigEvent = te
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=Player then return end
- if io.isMouse then
- m.Target = io.Target
- m.Hit = io.Hit
- else
- 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 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})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local Mouse = Player:GetMouse()
- 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)
- Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
- end
- --
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Model0 = Instance.new("Model")
- Humanoid1 = Instance.new("Humanoid")
- Script2 = Instance.new("Script")
- Part3 = Instance.new("Part")
- Sound4 = Instance.new("Sound")
- Sound5 = Instance.new("Sound")
- Part6 = Instance.new("Part")
- SpecialMesh7 = Instance.new("SpecialMesh")
- Sound8 = Instance.new("Sound")
- Sound9 = Instance.new("Sound")
- Sound10 = Instance.new("Sound")
- Script11 = Instance.new("Script")
- Sound12 = Instance.new("Sound")
- ManualWeld13 = Instance.new("ManualWeld")
- Model0.Name = "Giant Squirrel"
- Model0.Parent = mas
- Humanoid1.Name = "Zombie"
- Humanoid1.Parent = Model0
- Humanoid1.NameOcclusion = Enum.NameOcclusion.NoOcclusion
- Humanoid1.Torso = Part6
- Humanoid1.Health = 750
- Humanoid1.MaxHealth = 750
- Humanoid1.WalkSpeed = 45
- Script2.Parent = Model0
- table.insert(cors,sandbox(Script2,function()
- --Made by Stickmasterluke
- sp=script.Parent
- damage=100
- range=999999
- damagedealthdebounch = false
- DeathDB = false
- meshes={114647745,114647773,114647802,114647836,114647881,114647920,114647944}
- standingmesh=114636624
- --Accidental mesh with no legs. Maybe someone wants it anyways -> 115975800
- local head=sp:WaitForChild("Head")
- local hum=sp:WaitForChild("Zombie")
- local torso=sp:WaitForChild("Torso")
- local mesh=torso:WaitForChild("Mesh")
- --local ct=sp:WaitForChild("creator")
- local debris=game:GetService("Debris")
- alive=true
- currentmesh=0
- nextmove=0
- function shove(char)
- local wielder = script.Parent
- if wielder and wielder:FindFirstChild("HumanoidRootPart") and char and char:FindFirstChild("HumanoidRootPart") then
- local shover = wielder.HumanoidRootPart
- local shovee = char.HumanoidRootPart
- local distance = 200
- local duration = 1
- local speed = distance/duration
- local velocity = (shovee.Position - shover.Position).unit * speed
- script.Parent.Hit.Volume = 1
- script.Parent.Hit:Play()
- script.Parent.Hit.Volume = 1
- script.Parent.Hit:Play()
- local shoveForce = Instance.new("BodyVelocity")
- shoveForce.maxForce = Vector3.new(1e9, 1e9, 1e9)
- shoveForce.velocity = velocity
- shoveForce.Parent = shovee
- game:GetService("Debris"):AddItem(shoveForce, duration)
- local humanoid = char:FindFirstChild("Humanoid")
- humanoid.Sit = true
- wait(1)
- humanoid.Jump = true
- end
- end
- torso.Touched:connect(function(hit)
- if hit and hit.Parent and hit.Parent.Name~=sp.Name and alive then
- local h=hit.Parent:FindFirstChild("Humanoid")
- if h~=nil then
- local plr=game.Players:GetPlayerFromCharacter(hit.Parent)
- if plr then
- --[[if plr==ct.Value then
- return
- end]]
- end
- if damagedealthdebounch == false then
- damagedealthdebounch = true
- torso.Bite:Play()
- h:TakeDamage(damage)
- shove(h.Parent)
- Delay(0.25,function() damagedealthdebounch = false end)
- end
- end
- end
- end)
- hum.Changed:connect(function(prop)
- if hum then
- if hum.Health<=0 then
- if DeathDB == true then return end
- DeathDB = true
- alive=false
- if torso then
- torso.Footstep:Stop()
- torso.Death:Play()
- torso.Anchored=true
- if head then
- head:remove()
- end
- for i = 1,4 do
- torso.CFrame = torso.CFrame * CFrame.Angles(0,0,math.rad(22.5))
- wait(0.0125)
- end
- wait(0.7)
- torso.Mesh.VertexColor = Vector3.new(1,0.75,0.75)
- wait(0.1)
- torso.Mesh.VertexColor = Vector3.new(1,0.5,0.5)
- wait(0.1)
- torso.Mesh.VertexColor = Vector3.new(1,0.25,0.25)
- wait(0.1)
- torso.Mesh.VertexColor = Vector3.new(1,0,0)
- hum:remove()
- --[[local f=Instance.new("Fire")
- f.Parent=torso]]
- wait(15)
- for i = 0,1,0.1 do
- torso.Transparency = i
- wait(0.1)
- end
- end
- sp:remove()
- end
- else
- alive=false
- sp:remove()
- end
- end)
- Spawn(function()
- while hum and hum.Health~=0 do
- if torso and mesh then
- if torso.Velocity.magnitude>3 then
- currentmesh=currentmesh+1
- mesh.MeshId="http://www.roblox.com/asset/?id="..tostring(meshes[(currentmesh%(#meshes))+1])
- if mesh.MeshId=="http://www.roblox.com/asset/?id=114647944" or mesh.MeshId=="http://www.roblox.com/asset/?id=114647836" then
- torso.Footstep:Play()
- end
- else
- mesh.MeshId="http://www.roblox.com/asset/?id="..tostring(standingmesh)
- end
- end
- wait(0.05)
- end
- end)
- while alive do
- local t1,t2=wait(.05)
- if t2>nextmove then
- nextmove=t2+.5+math.random()
- closest=range
- target=nil
- for i,v in ipairs(game.Workspace:GetChildren()) do --targets every thing named humanoid that is in a model in workspace and is not another spide
- if v and v.className=="Model" and v.Name~=sp.Name then
- local t=v:FindFirstChild("Torso")
- local h=v:FindFirstChild("Humanoid")
- if t~=nil and h~=nil and h.Health>0 then
- safe=false
- local plr=game.Players:GetPlayerFromCharacter(v)
- if plr then
- --[[if plr==ct.Value then
- safe=true
- end]]
- end
- if not safe then
- local mag=(t.Position-torso.Position).magnitude
- if mag<closest then
- target=t
- closest=mag
- end
- end
- end
- end
- end
- if target then
- offset=target.Position+(Vector3.new(math.random()-.5,math.random()-.5,math.random()-.5)*6)
- --hum.WalkToPoint=point
- hum:MoveTo(offset,target)
- --[[if math.random()<.15 then
- hum.Jump=true
- end]]
- end
- end
- end
- end))
- Part3.Name = "Head"
- Part3.Parent = Model0
- Part3.BrickColor = BrickColor.new("Dark stone grey")
- Part3.Reflectance = 0.34999999403954
- Part3.Transparency = 1
- Part3.FormFactor = Enum.FormFactor.Symmetric
- Part3.Size = Vector3.new(6, 3, 6)
- Part3.CFrame = CFrame.new(-37, 13.5000048, -1.9999814, 1, -2.19868748e-10, -4.51800446e-08, -2.31807629e-10, 1, -3.7252903e-09, -4.51800162e-08, -3.7252903e-09, 0.999997497)
- Part3.BottomSurface = Enum.SurfaceType.Smooth
- Part3.TopSurface = Enum.SurfaceType.Smooth
- Part3.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part3.Position = Vector3.new(-37, 13.5000048, -1.9999814)
- Part3.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Sound4.Name = "Strike"
- Sound4.Parent = Part3
- Sound4.SoundId = "rbxassetid://491296320"
- Sound4.Volume = 1
- Sound5.Name = "Hit"
- Sound5.Parent = Part3
- Sound5.SoundId = "rbxassetid://386946017"
- Part6.Name = "Torso"
- Part6.Parent = Model0
- Part6.BrickColor = BrickColor.new("Dark stone grey")
- Part6.Reflectance = 0.34999999403954
- Part6.FormFactor = Enum.FormFactor.Symmetric
- Part6.Size = Vector3.new(6, 12, 6)
- Part6.CFrame = CFrame.new(-37, 6.00000477, -2, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part6.BottomSurface = Enum.SurfaceType.Smooth
- Part6.TopSurface = Enum.SurfaceType.Smooth
- Part6.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part6.Position = Vector3.new(-37, 6.00000477, -2)
- Part6.Color = Color3.new(0.388235, 0.372549, 0.384314)
- SpecialMesh7.Parent = Part6
- SpecialMesh7.MeshId = "http://www.roblox.com/asset/?id=114636624"
- SpecialMesh7.Scale = Vector3.new(8.99999905, 8.99999905, 8.99999905)
- SpecialMesh7.TextureId = "http://www.roblox.com/asset/?id=114634749"
- SpecialMesh7.MeshType = Enum.MeshType.FileMesh
- SpecialMesh7.Scale = Vector3.new(8.99999905, 8.99999905, 8.99999905)
- Sound8.Name = "Footstep"
- Sound8.Parent = Part6
- Sound8.Pitch = 2
- Sound8.SoundId = "http://www.roblox.com/asset/?id=106543491"
- Sound8.Volume = 1
- Sound9.Name = "Death"
- Sound9.Parent = Part6
- Sound9.Pitch = 2.5
- Sound9.SoundId = "http://www.roblox.com/Asset?ID=105264219"
- Sound9.Volume = 1
- Sound10.Name = "Bite"
- Sound10.Parent = Part6
- Sound10.Pitch = 0.94999998807907
- Sound10.SoundId = "http://www.roblox.com/Asset?ID=105264219"
- Sound10.Volume = 1
- Script11.Name = "JumpScript"
- Script11.Parent = Part6
- table.insert(cors,sandbox(Script11,function()
- local sp = script.Parent
- local Humanoid = sp.Parent:WaitForChild("Humanoid")
- Humanoid.Jumping:connect(function()
- sp.Jump:Play()
- sp.Mesh.Scale = Vector3.new(1.5,5,1.5)
- for i = 1,5 do
- if i == 5 then
- sp.Mesh.Scale = Vector3.new(3,3,3)
- else
- sp.Mesh.Scale = sp.Mesh.Scale + ((Vector3.new(3,3,3)-sp.Mesh.Scale)/5)
- end
- wait(0.02)
- end
- end)
- end))
- Sound12.Name = "Jump"
- Sound12.Parent = Part6
- Sound12.Pitch = 2
- Sound12.SoundId = "rbxasset://sounds//short spring sound.wav"
- Sound12.Volume = 1
- ManualWeld13.Name = "Torso-to-Head Strong Joint"
- ManualWeld13.Parent = Part6
- ManualWeld13.C0 = CFrame.new(-3, 6, 3, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- ManualWeld13.C1 = CFrame.new(-3, -1.5, 2.99998856, -1, -4.51800162e-08, -2.31807629e-10, 2.19868748e-10, -3.7252903e-09, 1, 4.51800446e-08, 0.999997497, -3.7252903e-09)
- ManualWeld13.Part0 = Part6
- ManualWeld13.Part1 = Part3
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = workspace
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement