Advertisement
HenloMyDude

steve's hand

Dec 6th, 2019
388
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.94 KB | None | 0 0
  1.  
  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.  
  7. plr = owner
  8. nob = 1
  9. max = 4
  10. min = 1
  11. blockt = "WoodPlanks"
  12. dmg = 10
  13. r1 = -15
  14. r2 = -25
  15. r3 = -35
  16. hold = true
  17. attack = false
  18. mouse = plr:GetMouse()
  19. char = plr.Character
  20. plrgui = plr.PlayerGui
  21. root = char.HumanoidRootPart
  22. sine = 0
  23. sin = math.sin
  24. cos = math.cos
  25. debris = game:GetService("Debris")
  26.  
  27. local gui = Instance.new("ScreenGui",plrgui)
  28. gui.Name = "SteveHand"
  29. local hand = Instance.new("ImageLabel",gui)
  30. hand.Size = UDim2.new(0, 480, 0, 515)
  31. hand.AnchorPoint = Vector2.new(1, 1.075)
  32. hand.Position = UDim2.new(1, 0, 1.075, 0)
  33. hand.BackgroundTransparency = 1
  34. hand.Image = "rbxassetid://3393883658"
  35. hand.Rotation = -15
  36. local Value = Instance.new("NumberValue",char)
  37. Value.Value = 15
  38.  
  39. swait = function(number)
  40. if number == 0 or number == nil then
  41. game:GetService("RunService").Heartbeat:Wait()
  42. else
  43. for i = 1,number do
  44. game:GetService("RunService").Heartbeat:Wait()
  45. end
  46. end
  47. end
  48.  
  49. function round(n)
  50. return math.floor(n + 0.5)
  51. end
  52.  
  53. function checkblock()
  54. if nob == 1 then
  55. blockt = "WoodPlanks"
  56. print("WoodPlanks")
  57. elseif nob == 2 then
  58. blockt = "Cobblestone"
  59. print("Cobblestone")
  60. elseif nob == 3 then
  61. blockt = "Grass"
  62. print("Grass")
  63. elseif nob == 4 then
  64. blockt = "Torch"
  65. print("Torch")
  66. end
  67. end
  68.  
  69. function placeblock()
  70. local block = Instance.new("Part",workspace)
  71. block.Size = Vector3.new(3, 3, 3)
  72. block.Anchored = true
  73. block.Transparency = 0
  74. block.CanCollide = true
  75. local a = mouse.Hit.p
  76. block.Position = Vector3.new(round(a.x), round(a.y), round(a.z)) + Vector3.new(0, 1.5, 0)
  77. if blockt == "WoodPlanks" then
  78. local top = Instance.new("Decal",block)
  79. top.Name = "a"
  80. top.Face = "Top"
  81. top.Texture = "rbxassetid://3131912507"
  82. top.Transparency = 0
  83. local top = Instance.new("Decal",block)
  84. top.Name = "a"
  85. top.Face = "Bottom"
  86. top.Texture = "rbxassetid://3131912507"
  87. top.Transparency = 0
  88. local top = Instance.new("Decal",block)
  89. top.Name = "a"
  90. top.Face = "Left"
  91. top.Texture = "rbxassetid://3131912507"
  92. top.Transparency = 0
  93. local top = Instance.new("Decal",block)
  94. top.Name = "a"
  95. top.Face = "Right"
  96. top.Texture = "rbxassetid://3131912507"
  97. top.Transparency = 0
  98. local top = Instance.new("Decal",block)
  99. top.Name = "a"
  100. top.Face = "Front"
  101. top.Texture = "rbxassetid://3131912507"
  102. top.Transparency = 0
  103. local top = Instance.new("Decal",block)
  104. top.Name = "a"
  105. top.Face = "Back"
  106. top.Texture = "rbxassetid://3131912507"
  107. top.Transparency = 0
  108. elseif blockt == "Cobblestone" then
  109. local top = Instance.new("Decal",block)
  110. top.Name = "a"
  111. top.Face = "Top"
  112. top.Texture = "rbxassetid://152572105"
  113. top.Transparency = 0
  114. local top = Instance.new("Decal",block)
  115. top.Name = "a"
  116. top.Face = "Bottom"
  117. top.Texture = "rbxassetid://152572105"
  118. top.Transparency = 0
  119. local top = Instance.new("Decal",block)
  120. top.Name = "a"
  121. top.Face = "Left"
  122. top.Texture = "rbxassetid://152572105"
  123. top.Transparency = 0
  124. local top = Instance.new("Decal",block)
  125. top.Name = "a"
  126. top.Face = "Right"
  127. top.Texture = "rbxassetid://152572105"
  128. top.Transparency = 0
  129. local top = Instance.new("Decal",block)
  130. top.Name = "a"
  131. top.Face = "Front"
  132. top.Texture = "rbxassetid://152572105"
  133. top.Transparency = 0
  134. local top = Instance.new("Decal",block)
  135. top.Name = "a"
  136. top.Face = "Back"
  137. top.Texture = "rbxassetid://152572105"
  138. top.Transparency = 0
  139. elseif blockt == "Torch" then
  140. block.Position = Vector3.new(round(a.x), round(a.y), round(a.z)) + Vector3.new(0, 0.75, 0)
  141. block.Size = Vector3.new(0.2, 1.4, 0.6)
  142. local mesh = Instance.new("BlockMesh",block)
  143. mesh.Scale = Vector3.new(2.5, 1.5, 1)
  144. local top = Instance.new("Decal",block)
  145. top.Name = "a"
  146. top.Face = "Top"
  147. top.Texture = "rbxassetid://61211168"
  148. top.Transparency = 0
  149. local top = Instance.new("Decal",block)
  150. top.Name = "a"
  151. top.Face = "Bottom"
  152. top.Texture = "rbxassetid://152572105"
  153. top.Transparency = 0
  154. local top = Instance.new("Decal",block)
  155. top.Name = "a"
  156. top.Face = "Left"
  157. top.Texture = "rbxassetid://61211135"
  158. top.Transparency = 0
  159. local top = Instance.new("Decal",block)
  160. top.Name = "a"
  161. top.Face = "Right"
  162. top.Texture = "rbxassetid://61211135"
  163. top.Transparency = 0
  164. local top = Instance.new("Decal",block)
  165. top.Name = "a"
  166. top.Face = "Front"
  167. top.Texture = "rbxassetid://61211135"
  168. top.Transparency = 0
  169. local top = Instance.new("Decal",block)
  170. top.Name = "a"
  171. top.Face = "Back"
  172. top.Texture = "rbxassetid://61211135"
  173. top.Transparency = 0
  174. local light = Instance.new("PointLight",block)
  175. elseif blockt == "Grass" then
  176. local top = Instance.new("Decal",block)
  177. top.Name = "a"
  178. top.Face = "Top"
  179. top.Texture = "rbxassetid://50485570"
  180. top.Transparency = 0
  181. local top = Instance.new("Decal",block)
  182. top.Name = "a"
  183. top.Face = "Bottom"
  184. top.Texture = "rbxassetid://3757821229"
  185. top.Transparency = 0
  186. local top = Instance.new("Decal",block)
  187. top.Name = "a"
  188. top.Face = "Left"
  189. top.Texture = "rbxassetid://3633730371"
  190. top.Transparency = 0
  191. local top = Instance.new("Decal",block)
  192. top.Name = "a"
  193. top.Face = "Right"
  194. top.Texture = "rbxassetid://3633730371"
  195. top.Transparency = 0
  196. local top = Instance.new("Decal",block)
  197. top.Name = "a"
  198. top.Face = "Front"
  199. top.Texture = "rbxassetid://3633730371"
  200. top.Transparency = 0
  201. local top = Instance.new("Decal",block)
  202. top.Name = "a"
  203. top.Face = "Back"
  204. top.Texture = "rbxassetid://3633730371"
  205. top.Transparency = 0
  206. end
  207. for i = 1,5 do
  208. swait()
  209. hand.AnchorPoint = hand.AnchorPoint:Lerp(Vector2.new(0.65, 0.65), 0.6)
  210. hand.Position = hand.Position:Lerp(UDim2.new(0.8, 0, 0.45, 0), 0.6)
  211. hand.Rotation = r2
  212. end
  213. for i = 1,3 do
  214. swait()
  215. hand.AnchorPoint = hand.AnchorPoint:Lerp(Vector2.new(0.65, 0.65), 0.6)
  216. hand.Position = hand.Position:Lerp(UDim2.new(0.65, 0, 0.65, 0), 0.6)
  217. hand.Rotation = r2
  218. end
  219. for i = 1,5 do
  220. swait()
  221. hand.AnchorPoint = hand.AnchorPoint:Lerp(Vector2.new(0.65, 1.3), 0.6)
  222. hand.Position = hand.Position:Lerp(UDim2.new(0.8, 0, 1.3, 0), 0.6)
  223. hand.Rotation = r3
  224. end
  225. end
  226.  
  227. function slap()
  228. attack = true
  229. hold = true
  230. hand.Size = UDim2.new(0, 480, 0, 530)
  231. --[[
  232. if mouse.Target and mouse.Target.Name ~= "Base" and mouse.Target.Name ~= "Baseplate" then
  233. local ack = mouse.Target
  234. local nub = ack.Parent
  235. if mouse.Target and nub and nub:FindFirstChild("Torso") or mouse.Target and nub and nub:FindFirstChild("UpperTorso") then
  236. local adada = nub:FindFirstChild("Torso") or nub:FindFirstChild("UpperTorso")
  237. if adada then
  238. local bv = Instance.new("BodyVelocity",adada)
  239. bv.Velocity = root.CFrame.lookVector * 75
  240. debris:AddItem(bv, 0.1)
  241. end
  242. for i,v in pairs (nub:children()) do
  243. if v:IsA("Part") and nub ~= workspace or v:IsA("MeshPart") and nub ~= workspace then
  244. local clone = v:Clone()
  245. clone.Parent = workspace
  246. clone.Transparency = 0.5
  247. clone.BrickColor = BrickColor.new("Really red")
  248. clone.CanCollide = false
  249. clone.Material = "Neon"
  250. clone:BreakJoints()
  251. clone:ClearAllChildren()
  252. clone.Anchored = true
  253. clone.Size = clone.Size + Vector3.new(0.1, 0.1, 0.1)
  254. debris:AddItem(clone, 0.5)
  255. end
  256. if v:IsA("Humanoid") and nub ~= workspace then
  257. v.Health = v.Health - 10
  258. end
  259. end
  260. elseif mouse.Target and mouse.Target.Name ~= "Base" and mouse.Target.Name ~= "Baseplate" and nub == workspace and not nub:FindFirstChild("Torso") or mouse.Target and nub == workspace and not nub:FindFirstChild("UpperTorso") then
  261. local block = mouse.Target
  262. if not block:FindFirstChild("crack") then
  263. local crack = Instance.new("NumberValue",block)
  264. crack.Value = 1
  265. crack.Name = "crack"
  266. local top = Instance.new("Decal",block)
  267. top.Name = "cracki"
  268. top.Face = "Top"
  269. top.Texture = "rbxassetid://110711859"
  270. top.Transparency = 0.75
  271. local top = Instance.new("Decal",block)
  272. top.Name = "cracki"
  273. top.Face = "Bottom"
  274. top.Texture = "rbxassetid://110711859"
  275. top.Transparency = 0.75
  276. local top = Instance.new("Decal",block)
  277. top.Name = "cracki"
  278. top.Face = "Left"
  279. top.Texture = "rbxassetid://110711859"
  280. top.Transparency = 0.75
  281. local top = Instance.new("Decal",block)
  282. top.Name = "cracki"
  283. top.Face = "Right"
  284. top.Texture = "rbxassetid://110711859"
  285. top.Transparency = 0.75
  286. local top = Instance.new("Decal",block)
  287. top.Name = "cracki"
  288. top.Face = "Front"
  289. top.Texture = "rbxassetid://110711859"
  290. top.Transparency = 0.75
  291. local top = Instance.new("Decal",block)
  292. top.Name = "cracki"
  293. top.Face = "Back"
  294. top.Texture = "rbxassetid://110711859"
  295. top.Transparency = 0.75
  296. elseif block:FindFirstChild("crack") then
  297. local crack = block.crack
  298. crack.Value = crack.Value + 1
  299. for i,v in pairs (block:children()) do
  300. if v:IsA("Decal") and v.Name == "cracki" then
  301. if crack.Value == 2 then
  302. v.Transparency = 0.5
  303. v.Texture = "rbxassetid://53164401"
  304. end
  305. if crack.Value == 3 then
  306. v.Transparency = 0.25
  307. v.Texture = "http://www.roblox.com/asset/?id=2862610475"
  308. end
  309. if crack.Value == 4 then
  310. v.Transparency = 0
  311. end
  312. if crack.Value == 5 then
  313. block:remove()
  314. end
  315. end
  316. end
  317. end
  318. end
  319. end
  320. ]]
  321. repeat
  322.  
  323. if mouse.Target and mouse.Target.Name ~= "Base" and mouse.Target.Name ~= "Baseplate" then
  324. local ack = mouse.Target
  325. local nub = ack.Parent
  326. if mouse.Target and nub and nub:FindFirstChild("Torso") or mouse.Target and nub and nub:FindFirstChild("UpperTorso") then
  327. local adada = nub:FindFirstChild("Torso") or nub:FindFirstChild("UpperTorso")
  328. if adada then
  329. local bv = Instance.new("BodyVelocity",adada)
  330. bv.Velocity = root.CFrame.lookVector * 75
  331. debris:AddItem(bv, 0.1)
  332. local s = Instance.new("Sound",adada) s.SoundId = "rbxassetid://4018616850" s.Volume = 10 s:Play()
  333. end
  334. for i,v in pairs (nub:children()) do
  335. if v:IsA("Part") and nub ~= workspace or v:IsA("MeshPart") and nub ~= workspace then
  336. local clone = v:Clone()
  337. clone.Parent = workspace
  338. clone.Transparency = 0.5
  339. clone.BrickColor = BrickColor.new("Really red")
  340. clone.CanCollide = false
  341. clone.Material = "Neon"
  342. clone:BreakJoints()
  343. clone:ClearAllChildren()
  344. clone.Anchored = true
  345. clone.Size = clone.Size + Vector3.new(0.1, 0.1, 0.1)
  346. debris:AddItem(clone, 0.5)
  347. end
  348. if v:IsA("Humanoid") and nub ~= workspace then
  349. v.Health = v.Health - dmg
  350. end
  351. end
  352. elseif mouse.Target and mouse.Target.Name ~= "Base" and mouse.Target.Name ~= "Baseplate" and nub == workspace and not nub:FindFirstChild("Torso") or mouse.Target and nub == workspace and not nub:FindFirstChild("UpperTorso") then
  353. local block = mouse.Target
  354. if not block:FindFirstChild("crack") then
  355. local crack = Instance.new("NumberValue",block)
  356. crack.Value = 1
  357. crack.Name = "crack"
  358. local top = Instance.new("Decal",block)
  359. top.Name = "cracki"
  360. top.Face = "Top"
  361. top.Texture = "rbxassetid://110711859"
  362. top.Transparency = 0.75
  363. local top = Instance.new("Decal",block)
  364. top.Name = "cracki"
  365. top.Face = "Bottom"
  366. top.Texture = "rbxassetid://110711859"
  367. top.Transparency = 0.75
  368. local top = Instance.new("Decal",block)
  369. top.Name = "cracki"
  370. top.Face = "Left"
  371. top.Texture = "rbxassetid://110711859"
  372. top.Transparency = 0.75
  373. local top = Instance.new("Decal",block)
  374. top.Name = "cracki"
  375. top.Face = "Right"
  376. top.Texture = "rbxassetid://110711859"
  377. top.Transparency = 0.75
  378. local top = Instance.new("Decal",block)
  379. top.Name = "cracki"
  380. top.Face = "Front"
  381. top.Texture = "rbxassetid://110711859"
  382. top.Transparency = 0.75
  383. local top = Instance.new("Decal",block)
  384. top.Name = "cracki"
  385. top.Face = "Back"
  386. top.Texture = "rbxassetid://110711859"
  387. top.Transparency = 0.75
  388. elseif block:FindFirstChild("crack") then
  389. local crack = block.crack
  390. crack.Value = crack.Value + 1
  391. for i,v in pairs (block:children()) do
  392. if v:IsA("Decal") and v.Name == "cracki" then
  393. if crack.Value == 2 then
  394. v.Transparency = 0.5
  395. v.Texture = "rbxassetid://53164401"
  396. end
  397. if crack.Value == 3 then
  398. v.Transparency = 0.25
  399. v.Texture = "http://www.roblox.com/asset/?id=2862610475"
  400. end
  401. if crack.Value == 4 then
  402. v.Transparency = 0
  403. end
  404. if crack.Value == 5 then
  405. block:remove()
  406. end
  407. end
  408. end
  409. end
  410. end
  411. end
  412.  
  413. for i = 1,5 do
  414. swait()
  415. hand.AnchorPoint = hand.AnchorPoint:Lerp(Vector2.new(0.65, 0.65), 0.6)
  416. hand.Position = hand.Position:Lerp(UDim2.new(0.8, 0, 0.45, 0), 0.6)
  417. hand.Rotation = r2
  418. end
  419. for i = 1,3 do
  420. swait()
  421. hand.AnchorPoint = hand.AnchorPoint:Lerp(Vector2.new(0.65, 0.65), 0.6)
  422. hand.Position = hand.Position:Lerp(UDim2.new(0.65, 0, 0.65, 0), 0.6)
  423. hand.Rotation = r2
  424. end
  425. for i = 1,5 do
  426. swait()
  427. hand.AnchorPoint = hand.AnchorPoint:Lerp(Vector2.new(0.65, 1.3), 0.6)
  428. hand.Position = hand.Position:Lerp(UDim2.new(0.8, 0, 1.3, 0), 0.6)
  429. hand.Rotation = r3
  430. end
  431. until hold == false
  432. hold = false
  433. attack = false
  434. end
  435.  
  436. mouse.KeyDown:connect(function(key)
  437. if key == "q" then
  438. hand.Image = "rbxassetid://3393883658"
  439. dmg = 10
  440. r1 = -15
  441. r2 = -25
  442. r3 = -35
  443. end
  444. if key == "e" then
  445. hand.Image = "rbxassetid://3516782316"
  446. dmg = 35
  447. r1 = -75
  448. r2 = -75
  449. r3 = -120
  450. end
  451. if key == "x" then
  452. if nob ~= max then
  453. nob = nob + 1
  454. elseif nob == max then
  455. nob = min
  456. end
  457. checkblock()
  458. end
  459. if key == "z" then
  460. if nob ~= min then
  461. nob = nob - 1
  462. elseif nob == min then
  463. nob = max
  464. end
  465. checkblock()
  466. end
  467. end)
  468.  
  469. mouse.Button1Down:connect(function()
  470. if attack == false then
  471. slap()
  472. end
  473. end)
  474.  
  475. mouse.Button2Down:connect(function()
  476. if attack == false then
  477. placeblock()
  478. end
  479. end)
  480.  
  481. mouse.Button1Up:connect(function()
  482. hold = false
  483. end)
  484.  
  485. coroutine.resume(coroutine.create(function()
  486. local fallTime = 0
  487. while true do
  488. local x = wait()
  489. if root.Velocity.Y <= -10 then
  490. fallTime = fallTime + x
  491. end
  492. if root.Velocity.Y > -10 then
  493. if fallTime >= 0.4 then
  494. char.Humanoid:TakeDamage(fallTime * 50)
  495. end
  496. fallTime = 0
  497. end
  498. end
  499. end))
  500.  
  501. while true do
  502. swait()
  503. sine = sine + 1
  504. local TORSOVELOCITY = (root.Velocity * Vector3.new(1, 0, 1)).magnitude
  505. if TORSOVELOCITY < 0.5 and attack == false then
  506. hand.Size = UDim2.new(0, 480, 0, 515)
  507. hand.AnchorPoint = hand.AnchorPoint:Lerp(Vector2.new(1, 1.075), 0.3)
  508. hand.Position = hand.Position:Lerp(UDim2.new(1, 0, 1.075, 0), 0.3)
  509. hand.Rotation = r1
  510. elseif TORSOVELOCITY > 0.5 and attack == false then
  511. hand.Size = UDim2.new(0, 480, 0, 515)
  512. hand.AnchorPoint = hand.AnchorPoint:Lerp(Vector2.new(1, 1.075), 0.3)
  513. hand.Position = hand.Position:Lerp(UDim2.new(1 - 0.025 * cos(sine / 8), 0, 1.075 - 0.025 * cos(sine / 4), 0), 0.3)
  514. hand.Rotation = r1
  515. end
  516. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement