Advertisement
sIendytubble

minecraft creeper script v2

Sep 9th, 2020 (edited)
727
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.62 KB | None | 0 0
  1. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  2. local RealPlayer = Player
  3. local a=RealPlayer;char=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
  4. char = game.Players.LocalPlayer.Character
  5. player = game.Players.LocalPlayer
  6.  
  7. function getrid(classname)
  8. for i,v in pairs(char:GetDescendants()) do
  9. if v.ClassName == classname then
  10. v:Destroy()
  11. end
  12. end
  13. end
  14. getrid("ShirtGraphic")
  15. getrid("Shirt")
  16. getrid("Pants")
  17. getrid("Hat")
  18. getrid("Accessory")
  19. getrid("Texture")
  20. getrid("Decal")
  21. getrid("SpecialMesh")
  22. getrid("CharacterMesh")
  23. getrid("BodyColors")
  24.  
  25. cameraremote = Instance.new("RemoteEvent",char)
  26. cameraremote.Name = "camremote"
  27. cameraremote.OnServerEvent:Connect(function(player, part, cframe)
  28. part.CFrame = cframe
  29. end)
  30.  
  31.  
  32. for i,v in pairs(char:GetChildren()) do
  33. if v.ClassName == "Part" or v.ClassName == "MeshPart" then
  34. if v.Name ~= "Head" and v.Name ~= "HumanoidRootPart" then
  35. v.Transparency = 1
  36. v.Size = Vector3.new(0,0,0)
  37. weld = Instance.new("Weld",v)
  38. weld.Part0 = char.Head
  39. weld.Part1 = v
  40. end
  41. end
  42. end
  43.  
  44.  
  45. camera = workspace.CurrentCamera
  46.  
  47. local camPart = Instance.new("Part", char)
  48. camPart.Size = Vector3.new(0, 0, 0)
  49. camPart.CFrame = camera.CFrame
  50. camPart.CanCollide = false
  51. camPart.Anchored = true
  52. camPart.Transparency = 1
  53. local camPart2 = Instance.new("Part", char)
  54. camPart2.Size = Vector3.new(0, 0, 0)
  55. camPart2.CFrame = camera.CFrame
  56. camPart2.CanCollide = false
  57. camPart2.Anchored = true
  58. camPart2.Transparency = 1
  59. camPart.Name = "camPart"
  60. camPart2.Name = "camPart2"
  61. head = char.Head
  62. w = false
  63. a = false
  64. s = false
  65. d = false
  66. lerpremote = Instance.new("RemoteEvent",char)
  67. lerpremote.Name = "lerpremote"
  68. lerpremote.OnServerEvent:Connect(function(player, part, start, endcframe, speed)
  69. part.CFrame = part.CFrame:lerp(start * endcframe, speed)
  70. end)
  71. NLS([[
  72. char = owner.Character
  73. char:FindFirstChildOfClass("Humanoid").CameraOffset = Vector3.new(0,-1.3,0)
  74. mouse = game.Players.LocalPlayer:GetMouse()
  75. w = false
  76. a = false
  77. s = false
  78. d = false
  79. head = char.Head
  80. remote = char:FindFirstChild("lerpremote")
  81. game:GetService("RunService").Stepped:Connect(function()
  82. speed = char:FindFirstChildOfClass("Humanoid").WalkSpeed / 2
  83. if w == true then
  84. --a = CFrame.new(0,0,-1)
  85. remote:FireServer(head, head.CFrame, CFrame.new(0,0,-speed),0.25)
  86. end
  87. if s == true then
  88. --a = CFrame.new(0,0,1)
  89. remote:FireServer(head, head.CFrame, CFrame.new(0,0,speed),0.25)
  90. end
  91. if a == true then
  92. --a = CFrame.new(-1,0,0)
  93. remote:FireServer(head, head.CFrame, CFrame.new(-speed,0,0),0.25)
  94. end
  95. if d == true then
  96. --a = CFrame.new(1,0,0)
  97. remote:FireServer(head, head.CFrame, CFrame.new(speed,0,0),0.25)
  98. end
  99. end)
  100.  
  101. --mouse = owner:GetMouse()
  102.  
  103. mouse.KeyDown:Connect(function(key)
  104. if key == "w" then
  105. w = true
  106. end
  107. if key == "a" then
  108. a = true
  109. end
  110. if key == "s" then
  111. s = true
  112. end
  113. if key == "d" then
  114. d = true
  115. end
  116. end)
  117. mouse.KeyUp:Connect(function(key)
  118. if key == "w" then
  119. w = false
  120. end
  121. if key == "a" then
  122. a = false
  123. end
  124. if key == "s" then
  125. s = false
  126. end
  127. if key == "d" then
  128. d = false
  129. end
  130. end)
  131. ]],char)
  132. head.Size = Vector3.new(1.3, 1.3, 1.3)
  133. function putTexture(part, frontF, backF, topF, bottomF, leftF, rightF, className)
  134. local faces = {"Front", "Back", "Top", "Bottom", "Left", "Right"}
  135. for i,f in pairs(faces) do
  136. local decal = Instance.new(className, part)
  137. if i == 1 then decal.Texture = frontF decal.Name = f end
  138. if i == 2 then decal.Texture = backF or frontF decal.Name = f end
  139. if i == 3 then decal.Texture = topF or frontF decal.Name = f end
  140. if i == 4 then decal.Texture = bottomF or frontF decal.Name = f end
  141. if i == 5 then decal.Texture = leftF or frontF decal.Name = f end
  142. if i == 6 then decal.Texture = rightF or frontF decal.Name = f end
  143. decal.Face = f
  144. end
  145. return part
  146. end
  147. putTexture(head, "rbxassetid://38738031", "rbxassetid://36047330",
  148. "rbxassetid://36047341", "rbxassetid://36047347",
  149. "rbxassetid://36047323", "rbxassetid://36047315", "Decal")
  150. head.Anchored = true
  151. game:GetService("RunService").Stepped:Connect(function()
  152. NLS([[
  153. camera = workspace.CurrentCamera
  154. char = owner.Character
  155. if char:FindFirstChild("camremote") then
  156. char:FindFirstChild("camremote"):FireServer(char.camPart, camera.CFrame)
  157. char:FindFirstChild("camremote"):FireServer(char.camPart2, camera.CFrame)
  158. end
  159. ]],char)
  160. camPart2.Position = char.Head.Position
  161. --head.CFrame = camPart2.CFrame
  162. head.CFrame = head.CFrame:lerp(camPart2.CFrame,0.25)
  163. end)
  164.  
  165. mouse = player:GetMouse()
  166.  
  167. mouse.KeyDown:Connect(function(key)
  168. if key == "w" then
  169. w = true
  170. end
  171. if key == "a" then
  172. a = true
  173. end
  174. if key == "s" then
  175. s = true
  176. end
  177. if key == "d" then
  178. d = true
  179. end
  180. end)
  181. mouse.KeyUp:Connect(function(key)
  182. if key == "w" then
  183. w = false
  184. end
  185. if key == "a" then
  186. a = false
  187. end
  188. if key == "s" then
  189. s = false
  190. end
  191. if key == "d" then
  192. d = false
  193. end
  194. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement