Advertisement
End_Wolf

Untitled

Sep 9th, 2018
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  4. local RealPlayer = Player
  5. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end
  6. plr = game.Players.LocalPlayer
  7. repeat wait() until plr.Character
  8. char = plr.Character
  9.  
  10. effect = Instance.new("Model",char)
  11. effect.Name = "Effects"
  12.  
  13.  
  14. moozik = Instance.new("Sound",char)
  15. moozik.SoundId = "rbxassetid://132024343"
  16. moozik.Volume = 10
  17. moozik.Looped = true
  18. moozik:Play()
  19. hurt = Instance.new("Sound",char)
  20. hurt.SoundId = "rbxassetid://975173739"
  21. hurt.Volume = 10
  22.  
  23.  
  24.  
  25.  
  26. local block = Instance.new("Part",effect)
  27. block.Size = Vector3.new(1,1,1)
  28. block.CanCollide = false
  29. local weld = Instance.new("Weld",block)
  30. weld.Part0 = block
  31. weld.Part1 = char["Right Arm"]
  32. weld.C0 = CFrame.new(-0.00427627563, -0.0187358856, 1.48222256, 1, 0, 0, 0, -0.0125430031, -0.999921381, 0, 0.999921262, -0.0125430049)
  33. local decal1 = Instance.new("Decal",block)
  34. decal1.Face = "Top"
  35. local decal2 = Instance.new("Decal",block)
  36. decal2.Face = "Front"
  37. local decal3 = Instance.new("Decal",block)
  38. decal3.Face = "Bottom"
  39. local decal4 = Instance.new("Decal",block)
  40. decal4.Face = "Back"
  41. local decal5 = Instance.new("Decal",block)
  42. decal5.Face = "Left"
  43. local decal6 = Instance.new("Decal",block)
  44. decal6.Face = "Right"
  45. damaged = false
  46. local reddamage = function(timeofeffect)
  47. for i,v in pairs(char:GetChildren()) do
  48. if v.ClassName == "Part" and v.Name ~= "HumanoidRootPart" then
  49. local cp = v:Clone()
  50. cp.Parent = effect
  51. cp.BrickColor = BrickColor.new("Really red")
  52. cp.Transparency = 0.7
  53. cp.CanCollide = false
  54. cp.Material = Enum.Material.Neon
  55. if cp.Name == "Head" then
  56. cp.face:Destroy()
  57. end
  58. if cp.Name == "Torso" then
  59. cp.roblox:Destroy()
  60. end
  61. if v ~= char.Head then
  62. cp.Size = v.Size+(Vector3.new(1,1,1)*0.2)
  63. else
  64. cp.Size = (Vector3.new(1,1,1)*v.Size.Y)+(Vector3.new(1,1,1)*0.2)
  65. end
  66. local weld = Instance.new("Weld",cp)
  67. weld.Part0 = v
  68. weld.Part1 = cp
  69. game:GetService("Debris"):AddItem(cp,timeofeffect)
  70. end
  71. end
  72. char.Torso.Velocity = char.Torso.CFrame.lookVector * -100
  73. hurt:Play()
  74. end
  75.  
  76. function changeyourblockdecal(bottom,top,left,right,back,front)
  77. decal3.Texture = bottom
  78. decal1.Texture = top
  79. decal5.Texture = left
  80. decal6.Texture = right
  81. decal4.Texture = back
  82. decal2.Texture = front
  83. end
  84. function changeblockdecal(whatblock , bottom,top,left,right,back,front)
  85. local tex1 = Instance.new("Decal",whatblock)
  86. tex1.Face = "Top"
  87. local tex2 = Instance.new("Decal",whatblock)
  88. tex2.Face = "Front"
  89. local tex3 = Instance.new("Decal",whatblock)
  90. tex3.Face = "Bottom"
  91. local tex4 = Instance.new("Decal",whatblock)
  92. tex4.Face = "Back"
  93. local tex5 = Instance.new("Decal",whatblock)
  94. tex5.Face = "Left"
  95. local tex6 = Instance.new("Decal",whatblock)
  96. tex6.Face = "Right"
  97. tex3.Texture = bottom
  98. tex1.Texture = top
  99. tex5.Texture = left
  100. tex6.Texture = right
  101. tex4.Texture = back
  102. tex2.Texture = front
  103. end
  104. lhand = char.Torso["Left Shoulder"]:Clone()
  105. rhand = char.Torso["Right Shoulder"]:Clone()
  106. local rhandweld = Instance.new("Weld",char)
  107. rhandweld.Part0 = char.Torso
  108. rhandweld.Part1 = char["Right Arm"]
  109. rhandweld.C0 = CFrame.new(1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1)
  110. local human2 = Instance.new("Weld",char)
  111. human2.Part0 = char.HumanoidRootPart
  112. human2.Part1 = char.Torso
  113. human2co = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  114.  
  115.  
  116. function changeblocktype(whattype)
  117. if whattype == "Grass" then
  118. changeyourblockdecal("http://www.roblox.com/asset/?id=96167755","http://www.roblox.com/asset/?id=96430265","http://www.roblox.com/asset/?id=96430337","http://www.roblox.com/asset/?id=96430337","http://www.roblox.com/asset/?id=96430337","http://www.roblox.com/asset/?id=96430337")
  119. end
  120. if whattype == "Dirt" then
  121. changeyourblockdecal("http://www.roblox.com/asset/?id=96167755","http://www.roblox.com/asset/?id=96167755","http://www.roblox.com/asset/?id=96167755","http://www.roblox.com/asset/?id=96167755","http://www.roblox.com/asset/?id=96167755","http://www.roblox.com/asset/?id=96167755")
  122. end
  123. if whattype == "Cobblestone" then
  124. changeyourblockdecal("http://www.roblox.com/asset/?id=57539377","http://www.roblox.com/asset/?id=57539377","http://www.roblox.com/asset/?id=57539377","http://www.roblox.com/asset/?id=57539377","http://www.roblox.com/asset/?id=57539377","http://www.roblox.com/asset/?id=57539377")
  125. end
  126. if whattype == "Gold" then
  127. changeyourblockdecal("http://www.roblox.com/asset/?id=71405851","http://www.roblox.com/asset/?id=71405851","http://www.roblox.com/asset/?id=71405851","http://www.roblox.com/asset/?id=71405851","http://www.roblox.com/asset/?id=71405851","http://www.roblox.com/asset/?id=71405851")
  128. end
  129. if whattype == "Stone" then
  130. changeyourblockdecal("http://www.roblox.com/asset/?id=56882261","http://www.roblox.com/asset/?id=56882261","http://www.roblox.com/asset/?id=56882261","http://www.roblox.com/asset/?id=56882261","http://www.roblox.com/asset/?id=56882261","http://www.roblox.com/asset/?id=56882261")
  131. end
  132. if whattype == "DiamondBlock" then
  133. changeyourblockdecal("http://www.roblox.com/asset/?id=59262371","http://www.roblox.com/asset/?id=59262371","http://www.roblox.com/asset/?id=59262371","http://www.roblox.com/asset/?id=59262371","http://www.roblox.com/asset/?id=59262371","http://www.roblox.com/asset/?id=59262371")
  134. end
  135. if whattype == "DiamondOre" then
  136. changeyourblockdecal("http://www.roblox.com/asset/?id=49919647","http://www.roblox.com/asset/?id=49919647","http://www.roblox.com/asset/?id=49919647","http://www.roblox.com/asset/?id=49919647","http://www.roblox.com/asset/?id=49919647","http://www.roblox.com/asset/?id=49919647")
  137. end
  138. if whattype == "WoodenPlank" then
  139. changeyourblockdecal("http://www.roblox.com/asset/?id=107806036","http://www.roblox.com/asset/?id=107806036","http://www.roblox.com/asset/?id=107806036","http://www.roblox.com/asset/?id=107806036","http://www.roblox.com/asset/?id=107806036","http://www.roblox.com/asset/?id=107806036")
  140. end
  141. if whattype == "OakWood" then
  142. changeyourblockdecal("http://www.roblox.com/asset/?id=55355773","http://www.roblox.com/asset/?id=55355773","http://www.roblox.com/asset/?id=55319786","http://www.roblox.com/asset/?id=55319786","http://www.roblox.com/asset/?id=55319786","http://www.roblox.com/asset/?id=55319786")
  143. end
  144. if whattype == "GoldOre" then
  145. changeyourblockdecal("http://www.roblox.com/asset/?id=73374646","http://www.roblox.com/asset/?id=73374646","http://www.roblox.com/asset/?id=73374646","http://www.roblox.com/asset/?id=73374646","http://www.roblox.com/asset/?id=73374646","http://www.roblox.com/asset/?id=73374646")
  146. end
  147. if whattype == "Sponge" then
  148. changeyourblockdecal("http://www.roblox.com/asset/?id=38945383","http://www.roblox.com/asset/?id=38945383","http://www.roblox.com/asset/?id=38945383","http://www.roblox.com/asset/?id=38945383","http://www.roblox.com/asset/?id=38945383","http://www.roblox.com/asset/?id=38945383")
  149. end
  150. end
  151.  
  152. changeblocktype("Grass")
  153.  
  154.  
  155.  
  156. function playanim(whatanim,speed)
  157. if whatanim == "Place" then
  158. rhandweld.Parent = char.Torso
  159. for i = 0,1, speed do
  160. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.5, 0.473864555, -0.788700104, 1, 0, 0, 0, -0.0214149933, -0.999770641, 0, 0.999770641, -0.0214149933),i)
  161. game:GetService("RunService").RenderStepped:wait()
  162. end
  163. for i = 0,1, speed do
  164. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(0.957962036, 0.0477108955, -1.06759644, 0.445479125, 0.728770554, 0.520040333, 0.0191690028, 0.572963655, -0.81935662, -0.895087242, 0.374974847, 0.241273522),i)
  165. game:GetService("RunService").RenderStepped:wait()
  166. end
  167. end
  168. if whatanim == "Destroy" then
  169. rhandweld.Parent = char.Torso
  170. for i = 0,1, speed do
  171. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.5, 0.473864555, -0.788700104, 1, 0, 0, 0, -0.0214149933, -0.999770641, 0, 0.999770641, -0.0214149933),i)
  172. game:GetService("RunService").RenderStepped:wait()
  173. end
  174. for i = 0,1, speed do
  175. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(0.957962036, 0.0477108955, -1.06759644, 0.445479125, 0.728770554, 0.520040333, 0.0191690028, 0.572963655, -0.81935662, -0.895087242, 0.374974847, 0.241273522),i)
  176. game:GetService("RunService").RenderStepped:wait()
  177. end
  178. end
  179. if whatanim == "NormalPose" then
  180. for i = 0,1 , speed do
  181. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1),i)
  182. game:GetService("RunService").RenderStepped:wait()
  183. end
  184. end
  185. end
  186. canuse = true
  187. mouse = plr:GetMouse()
  188. function buildblock()
  189. if canuse then
  190. canuse = false
  191. playanim("Place", 0.07)
  192. local theactualblock = Instance.new("Part")
  193. theactualblock:BreakJoints()
  194. theactualblock.Parent = workspace
  195. theactualblock.Transparency = 0
  196. theactualblock.CFrame = mouse.Hit + Vector3.new(0,1.09,0)
  197. theactualblock.Orientation = Vector3.new(0,0,0)
  198. theactualblock.Size = Vector3.new(3,3,3)
  199. theactualblock.Anchored = true
  200. theactualblock.CanCollide = true
  201. theactualblock.Name = "BlockPlace"
  202. changeblockdecal(theactualblock,decal3.Texture, decal1.Texture, decal5.Texture,decal6.Texture, decal4.Texture, decal2.Texture)
  203. playanim("NormalPose", 0.3)
  204. canuse = true
  205. end
  206. end
  207. function destroyblock()
  208. if mouse.Target.Name == "BlockPlace" and mouse.Target.Name ~= "Base" and mouse.Target.Name ~= "Baseplate" and mouse.Target.Name ~= "Workspace" then
  209. playanim("Destroy", 0.07)
  210. mouse.Target:Destroy()
  211. playanim("NormalPose", 0.3)
  212. end
  213. end
  214. local mouse1 = mouse.Button1Down:connect(function()
  215. buildblock()
  216. end)
  217. local mouse2 = mouse.KeyDown:connect(function(k)
  218. if k == "q" then
  219. destroyblock()
  220. end
  221. if k == "e" then
  222. local chance = math.random(1,11)
  223. if chance == 1 then
  224. changeblocktype("Grass")
  225. end
  226. if chance == 2 then
  227. changeblocktype("Dirt")
  228. end
  229. if chance == 3 then
  230. changeblocktype("Cobblestone")
  231. end
  232. if chance == 4 then
  233. changeblocktype("Gold")
  234. end
  235. if chance == 5 then
  236. changeblocktype("Stone")
  237. end
  238. if chance == 6 then
  239. changeblocktype("DiamondBlock")
  240. end
  241. if chance == 7 then
  242. changeblocktype("DiamondOre")
  243. end
  244. if chance == 8 then
  245. changeblocktype("WoodenPlank")
  246. end
  247. if chance == 9 then
  248. changeblocktype("OakWood")
  249. end
  250. if chance == 10 then
  251. changeblocktype("GoldOre")
  252. end
  253. if chance == 11 then
  254. changeblocktype("Sponge")
  255. end
  256. end
  257. end)
  258. HasDied = false
  259. Dead = false
  260. local reddeath = function()
  261. for i,v in pairs(char:GetChildren()) do
  262. if v.ClassName == "Part" and v.Name ~= "HumanoidRootPart" then
  263. local cp = v:Clone()
  264. cp.Parent = effect
  265. cp.BrickColor = BrickColor.new("Really red")
  266. cp.Transparency = 1
  267. cp.CanCollide = false
  268. cp.Material = Enum.Material.Neon
  269. if cp.Name == "Head" then
  270. cp.face:Destroy()
  271. end
  272. if cp.Name == "Torso" then
  273. cp.roblox:Destroy()
  274. end
  275. if v ~= char.Head then
  276. cp.Size = v.Size+(Vector3.new(1,1,1)*0.2)
  277. else
  278. cp.Size = (Vector3.new(1,1,1)*v.Size.Y)+(Vector3.new(1,1,1)*0.2)
  279. end
  280. local weld = Instance.new("Weld",cp)
  281. weld.Part0 = v
  282. weld.Part1 = cp
  283. end
  284. end
  285. end
  286. reddeath()
  287. generategui = function()
  288. local screen = Instance.new("ScreenGui",plr.PlayerGui)
  289. screen.Name = "Death(lol i was lazy to add buttons lol)"
  290. local text = Instance.new("TextLabel",screen)
  291. text.Text = "You died!"
  292. text.TextColor3 = Color3.new(1,1,1)
  293. text.Font = "Arcade"
  294. text.TextScaled = true
  295. text.Position = UDim2.new(0.381, 0,0.172, 0)
  296. text.Size = UDim2.new(0, 200, 0, 50)
  297. text.BackgroundTransparency = 1
  298. local respawn = Instance.new("TextButton",screen)
  299. respawn.Text = "Respawn"
  300. respawn.TextScaled = true
  301. respawn.Position = UDim2.new(0.381, 0,0.561, 0)
  302. respawn.Size = UDim2.new(0, 200,0, 50)
  303. respawn.BackgroundTransparency = 1
  304. respawn.TextColor3 = Color3.new(1,1,1)
  305. respawn.Font = "Arcade"
  306. respawn.MouseButton1Click:connect(function()
  307. Dead = false
  308. HasDied = false
  309. char.Humanoid.Health = 0
  310. char.Parent = nil
  311. respawn.Text = "Say g/r or g/sr to respawn properly"
  312. end)
  313. end
  314. local BODY = {}
  315. LeftArm = char["Left Arm"]
  316. RightLeg = char["Right Leg"]
  317. LeftLeg = char["Left Leg"]
  318. for _, c in pairs(char:GetDescendants()) do
  319. if c:IsA("BasePart") and c.Name ~= "Handle" then
  320. if c ~= char.HumanoidRootPart and c ~= char.Torso and c ~= char.Head and c ~= char["Right Arm"] and c ~= LeftArm and c ~= RightLeg and c ~= LeftLeg then
  321. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  322. end
  323. table.insert(BODY,{c,c.Parent,c.Material,c.Color,c.Transparency})
  324. elseif c:IsA("JointInstance") then
  325. table.insert(BODY,{c,c.Parent,nil,nil,nil})
  326. end
  327. end
  328. for e = 1, #BODY do
  329. if BODY[e] ~= nil then
  330. local STUFF = BODY[e]
  331. local PART = STUFF[1]
  332. local PARENT = STUFF[2]
  333. local MATERIAL = STUFF[3]
  334. local TRANSPARENCY = STUFF[5]
  335. if PART.ClassName == "Part" and PART ~= char.HumanoidRootPart then
  336. PART.Material = MATERIAL
  337. PART.Transparency = TRANSPARENCY
  338. end
  339. PART.AncestryChanged:Connect(function()
  340. PART.Parent = PARENT
  341. end)
  342. end
  343. end
  344. function refit()
  345. char.Parent = workspace
  346. for e = 1, #BODY do
  347. if BODY[e] ~= nil then
  348. local STUFF = BODY[e]
  349. local PART = STUFF[1]
  350. local PARENT = STUFF[2]
  351. local MATERIAL = STUFF[3]
  352. local TRANSPARENCY = STUFF[5]
  353. if PART.ClassName == "Part" and PART ~= char.HumanoidRootPart then
  354. PART.Material = MATERIAL
  355. PART.Transparency = TRANSPARENCY
  356. end
  357. if PART.Parent ~= PARENT then
  358. char:FindFirstChildOfClass("Humanoid"):remove()
  359. PART.Parent = PARENT
  360. Humanoid = Instance.new("Humanoid",char)
  361. end
  362. end
  363. end
  364. end
  365. char.Humanoid.Died:connect(function()
  366. hurt:Play()
  367. refit()
  368. mouse1:Disconnect()
  369. mouse2:Disconnect()
  370. for i,v in pairs(effect:GetChildren()) do
  371. if v.ClassName == "Part" then
  372. v.Transparency = 0.7
  373. end
  374. end
  375. workspace.CurrentCamera.CameraSubject = char.Head
  376. generategui()
  377. HasDied = true
  378. Dead = true
  379. for i = 0,1, 0.03 do
  380. human2.C0 = human2.C0:lerp(CFrame.new(1.99999964, -3.00000095, 0, -0.00852799695, 0.999963641, 0, -0.999963641, -0.00852799695, 0, 0, 0, 1):inverse() + Vector3.new(0,1,0),i)
  381. game:GetService("RunService").RenderStepped:wait()
  382. end
  383. end)
  384. while true do
  385. game:GetService("RunService").RenderStepped:wait()
  386. if char.Humanoid.Health < 100 and not damaged and not Dead and not HasDied then
  387. reddamage(0.5)
  388. damaged = true
  389. wait(1)
  390. damaged = false
  391. char.Humanoid.Health = 100
  392. end
  393. if char.Humanoid.Health < 1 and Dead and HasDied then
  394. refit()
  395. for i,v in pairs(effect:GetChildren()) do
  396. if v.ClassName == "Part" then
  397. v.Transparency = 0.7
  398. end
  399. end
  400. end
  401. if Dead and HasDied then
  402. char.Humanoid.WalkSpeed = 0
  403. char.Humanoid.JumpPower = 0
  404. human2.Parent = char.Torso
  405. rhandweld.Parent = char.Torso
  406. end
  407. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement