Advertisement
Kaemi

GIGASQUIRREL

Feb 21st, 2018
418
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.91 KB | None | 0 0
  1. -- This script has been converted to FE by iPxter
  2.  
  3.  
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  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 UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local Mouse = Player:GetMouse()
  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. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86. --
  87. function sandbox(var,func)
  88. local env = getfenv(func)
  89. local newenv = setmetatable({},{
  90. __index = function(self,k)
  91. if k=="script" then
  92. return var
  93. else
  94. return env[k]
  95. end
  96. end,
  97. })
  98. setfenv(func,newenv)
  99. return func
  100. end
  101. cors = {}
  102. mas = Instance.new("Model",game:GetService("Lighting"))
  103. Model0 = Instance.new("Model")
  104. Humanoid1 = Instance.new("Humanoid")
  105. Script2 = Instance.new("Script")
  106. Part3 = Instance.new("Part")
  107. Sound4 = Instance.new("Sound")
  108. Sound5 = Instance.new("Sound")
  109. Part6 = Instance.new("Part")
  110. SpecialMesh7 = Instance.new("SpecialMesh")
  111. Sound8 = Instance.new("Sound")
  112. Sound9 = Instance.new("Sound")
  113. Sound10 = Instance.new("Sound")
  114. Script11 = Instance.new("Script")
  115. Sound12 = Instance.new("Sound")
  116. ManualWeld13 = Instance.new("ManualWeld")
  117. Model0.Name = "Giant Squirrel"
  118. Model0.Parent = mas
  119. Humanoid1.Name = "Zombie"
  120. Humanoid1.Parent = Model0
  121. Humanoid1.NameOcclusion = Enum.NameOcclusion.NoOcclusion
  122. Humanoid1.Torso = Part6
  123. Humanoid1.Health = 750
  124. Humanoid1.MaxHealth = 750
  125. Humanoid1.WalkSpeed = 45
  126. Script2.Parent = Model0
  127. table.insert(cors,sandbox(Script2,function()
  128. --Made by Stickmasterluke
  129.  
  130.  
  131. sp=script.Parent
  132.  
  133.  
  134. damage=100
  135. range=999999
  136. damagedealthdebounch = false
  137. DeathDB = false
  138.  
  139. meshes={114647745,114647773,114647802,114647836,114647881,114647920,114647944}
  140. standingmesh=114636624
  141. --Accidental mesh with no legs. Maybe someone wants it anyways -> 115975800
  142.  
  143. local head=sp:WaitForChild("Head")
  144. local hum=sp:WaitForChild("Zombie")
  145. local torso=sp:WaitForChild("Torso")
  146. local mesh=torso:WaitForChild("Mesh")
  147. --local ct=sp:WaitForChild("creator")
  148. local debris=game:GetService("Debris")
  149.  
  150.  
  151. alive=true
  152. currentmesh=0
  153. nextmove=0
  154.  
  155. function shove(char)
  156. local wielder = script.Parent
  157. if wielder and wielder:FindFirstChild("HumanoidRootPart") and char and char:FindFirstChild("HumanoidRootPart") then
  158. local shover = wielder.HumanoidRootPart
  159. local shovee = char.HumanoidRootPart
  160.  
  161. local distance = 200
  162. local duration = 1
  163. local speed = distance/duration
  164.  
  165. local velocity = (shovee.Position - shover.Position).unit * speed
  166.  
  167. script.Parent.Hit.Volume = 1
  168. script.Parent.Hit:Play()
  169. script.Parent.Hit.Volume = 1
  170. script.Parent.Hit:Play()
  171. local shoveForce = Instance.new("BodyVelocity")
  172. shoveForce.maxForce = Vector3.new(1e9, 1e9, 1e9)
  173. shoveForce.velocity = velocity
  174. shoveForce.Parent = shovee
  175. game:GetService("Debris"):AddItem(shoveForce, duration)
  176. local humanoid = char:FindFirstChild("Humanoid")
  177. humanoid.Sit = true
  178.  
  179. wait(1)
  180. humanoid.Jump = true
  181. end
  182. end
  183.  
  184. torso.Touched:connect(function(hit)
  185. if hit and hit.Parent and hit.Parent.Name~=sp.Name and alive then
  186. local h=hit.Parent:FindFirstChild("Humanoid")
  187. if h~=nil then
  188. local plr=game.Players:GetPlayerFromCharacter(hit.Parent)
  189. if plr then
  190. --[[if plr==ct.Value then
  191. return
  192. end]]
  193. end
  194. if damagedealthdebounch == false then
  195. damagedealthdebounch = true
  196. torso.Bite:Play()
  197. h:TakeDamage(damage)
  198. shove(h.Parent)
  199. Delay(0.25,function() damagedealthdebounch = false end)
  200. end
  201. end
  202. end
  203. end)
  204.  
  205. hum.Changed:connect(function(prop)
  206. if hum then
  207. if hum.Health<=0 then
  208. if DeathDB == true then return end
  209. DeathDB = true
  210. alive=false
  211. if torso then
  212. torso.Footstep:Stop()
  213. torso.Death:Play()
  214. torso.Anchored=true
  215. if head then
  216. head:remove()
  217. end
  218. for i = 1,4 do
  219. torso.CFrame = torso.CFrame * CFrame.Angles(0,0,math.rad(22.5))
  220. wait(0.0125)
  221. end
  222. wait(0.7)
  223. torso.Mesh.VertexColor = Vector3.new(1,0.75,0.75)
  224. wait(0.1)
  225. torso.Mesh.VertexColor = Vector3.new(1,0.5,0.5)
  226. wait(0.1)
  227. torso.Mesh.VertexColor = Vector3.new(1,0.25,0.25)
  228. wait(0.1)
  229. torso.Mesh.VertexColor = Vector3.new(1,0,0)
  230. hum:remove()
  231. --[[local f=Instance.new("Fire")
  232. f.Parent=torso]]
  233. wait(15)
  234. for i = 0,1,0.1 do
  235. torso.Transparency = i
  236. wait(0.1)
  237. end
  238. end
  239. sp:remove()
  240. end
  241. else
  242. alive=false
  243. sp:remove()
  244. end
  245. end)
  246.  
  247. Spawn(function()
  248. while hum and hum.Health~=0 do
  249. if torso and mesh then
  250. if torso.Velocity.magnitude>3 then
  251. currentmesh=currentmesh+1
  252. mesh.MeshId="http://www.roblox.com/asset/?id="..tostring(meshes[(currentmesh%(#meshes))+1])
  253. if mesh.MeshId=="http://www.roblox.com/asset/?id=114647944" or mesh.MeshId=="http://www.roblox.com/asset/?id=114647836" then
  254. torso.Footstep:Play()
  255. end
  256. else
  257. mesh.MeshId="http://www.roblox.com/asset/?id="..tostring(standingmesh)
  258. end
  259. end
  260. wait(0.05)
  261. end
  262. end)
  263.  
  264. while alive do
  265. local t1,t2=wait(.05)
  266. if t2>nextmove then
  267. nextmove=t2+.5+math.random()
  268. closest=range
  269. target=nil
  270. 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
  271. if v and v.className=="Model" and v.Name~=sp.Name then
  272. local t=v:FindFirstChild("Torso")
  273. local h=v:FindFirstChild("Humanoid")
  274. if t~=nil and h~=nil and h.Health>0 then
  275. safe=false
  276. local plr=game.Players:GetPlayerFromCharacter(v)
  277. if plr then
  278. --[[if plr==ct.Value then
  279. safe=true
  280. end]]
  281. end
  282. if not safe then
  283. local mag=(t.Position-torso.Position).magnitude
  284. if mag<closest then
  285. target=t
  286. closest=mag
  287. end
  288. end
  289. end
  290. end
  291. end
  292. if target then
  293. offset=target.Position+(Vector3.new(math.random()-.5,math.random()-.5,math.random()-.5)*6)
  294. --hum.WalkToPoint=point
  295. hum:MoveTo(offset,target)
  296. --[[if math.random()<.15 then
  297. hum.Jump=true
  298. end]]
  299. end
  300. end
  301. end
  302.  
  303.  
  304.  
  305. end))
  306. Part3.Name = "Head"
  307. Part3.Parent = Model0
  308. Part3.BrickColor = BrickColor.new("Dark stone grey")
  309. Part3.Reflectance = 0.34999999403954
  310. Part3.Transparency = 1
  311. Part3.FormFactor = Enum.FormFactor.Symmetric
  312. Part3.Size = Vector3.new(6, 3, 6)
  313. 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)
  314. Part3.BottomSurface = Enum.SurfaceType.Smooth
  315. Part3.TopSurface = Enum.SurfaceType.Smooth
  316. Part3.Color = Color3.new(0.388235, 0.372549, 0.384314)
  317. Part3.Position = Vector3.new(-37, 13.5000048, -1.9999814)
  318. Part3.Color = Color3.new(0.388235, 0.372549, 0.384314)
  319. Sound4.Name = "Strike"
  320. Sound4.Parent = Part3
  321. Sound4.SoundId = "rbxassetid://491296320"
  322. Sound4.Volume = 1
  323. Sound5.Name = "Hit"
  324. Sound5.Parent = Part3
  325. Sound5.SoundId = "rbxassetid://386946017"
  326. Part6.Name = "Torso"
  327. Part6.Parent = Model0
  328. Part6.BrickColor = BrickColor.new("Dark stone grey")
  329. Part6.Reflectance = 0.34999999403954
  330. Part6.FormFactor = Enum.FormFactor.Symmetric
  331. Part6.Size = Vector3.new(6, 12, 6)
  332. Part6.CFrame = CFrame.new(-37, 6.00000477, -2, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  333. Part6.BottomSurface = Enum.SurfaceType.Smooth
  334. Part6.TopSurface = Enum.SurfaceType.Smooth
  335. Part6.Color = Color3.new(0.388235, 0.372549, 0.384314)
  336. Part6.Position = Vector3.new(-37, 6.00000477, -2)
  337. Part6.Color = Color3.new(0.388235, 0.372549, 0.384314)
  338. SpecialMesh7.Parent = Part6
  339. SpecialMesh7.MeshId = "http://www.roblox.com/asset/?id=114636624"
  340. SpecialMesh7.Scale = Vector3.new(8.99999905, 8.99999905, 8.99999905)
  341. SpecialMesh7.TextureId = "http://www.roblox.com/asset/?id=114634749"
  342. SpecialMesh7.MeshType = Enum.MeshType.FileMesh
  343. SpecialMesh7.Scale = Vector3.new(8.99999905, 8.99999905, 8.99999905)
  344. Sound8.Name = "Footstep"
  345. Sound8.Parent = Part6
  346. Sound8.Pitch = 2
  347. Sound8.SoundId = "http://www.roblox.com/asset/?id=106543491"
  348. Sound8.Volume = 1
  349. Sound9.Name = "Death"
  350. Sound9.Parent = Part6
  351. Sound9.Pitch = 2.5
  352. Sound9.SoundId = "http://www.roblox.com/Asset?ID=105264219"
  353. Sound9.Volume = 1
  354. Sound10.Name = "Bite"
  355. Sound10.Parent = Part6
  356. Sound10.Pitch = 0.94999998807907
  357. Sound10.SoundId = "http://www.roblox.com/Asset?ID=105264219"
  358. Sound10.Volume = 1
  359. Script11.Name = "JumpScript"
  360. Script11.Parent = Part6
  361. table.insert(cors,sandbox(Script11,function()
  362. local sp = script.Parent
  363. local Humanoid = sp.Parent:WaitForChild("Humanoid")
  364.  
  365. Humanoid.Jumping:connect(function()
  366. sp.Jump:Play()
  367. sp.Mesh.Scale = Vector3.new(1.5,5,1.5)
  368. for i = 1,5 do
  369. if i == 5 then
  370. sp.Mesh.Scale = Vector3.new(3,3,3)
  371. else
  372. sp.Mesh.Scale = sp.Mesh.Scale + ((Vector3.new(3,3,3)-sp.Mesh.Scale)/5)
  373. end
  374. wait(0.02)
  375. end
  376. end)
  377. end))
  378. Sound12.Name = "Jump"
  379. Sound12.Parent = Part6
  380. Sound12.Pitch = 2
  381. Sound12.SoundId = "rbxasset://sounds//short spring sound.wav"
  382. Sound12.Volume = 1
  383. ManualWeld13.Name = "Torso-to-Head Strong Joint"
  384. ManualWeld13.Parent = Part6
  385. ManualWeld13.C0 = CFrame.new(-3, 6, 3, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  386. 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)
  387. ManualWeld13.Part0 = Part6
  388. ManualWeld13.Part1 = Part3
  389. for i,v in pairs(mas:GetChildren()) do
  390. v.Parent = workspace
  391. pcall(function() v:MakeJoints() end)
  392. end
  393. mas:Destroy()
  394. for i,v in pairs(cors) do
  395. spawn(function()
  396. pcall(v)
  397. end)
  398. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement