sIendytubble

stevegod

May 1st, 2020
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 66.47 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5. print("FE Compatibility code by Mokiros")
  6. local rp = RealPlayer
  7. script.Parent = rp.Character
  8.  
  9. --RemoteEvent for communicating
  10. local Event = Instance.new("RemoteEvent")
  11. Event.Name = "UserInput_Event"
  12.  
  13. --Fake event to make stuff like Mouse.KeyDown work
  14. local function fakeEvent()
  15. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  16. t.connect = t.Connect
  17. return t
  18. end
  19.  
  20. --Creating fake input objects with fake variables
  21. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  22. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  23. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  24. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  25. end}
  26. --Merged 2 functions into one by checking amount of arguments
  27. CAS.UnbindAction = CAS.BindAction
  28.  
  29. --This function will trigger the events that have been :Connect()'ed
  30. local function te(self,ev,...)
  31. local t = m[ev]
  32. if t and t._fakeEvent then
  33. for _,f in pairs(t.Functions) do
  34. f(...)
  35. end
  36. end
  37. end
  38. m.TrigEvent = te
  39. UIS.TrigEvent = te
  40.  
  41. Event.OnServerEvent:Connect(function(plr,io)
  42. if plr~=rp then return end
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. if not io.isMouse then
  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. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  51. return m:TrigEvent(b and "Button2Down" or "Button2Up")
  52. end
  53. for _,t in pairs(CAS.Actions) do
  54. for _,k in pairs(t.Keys) do
  55. if k==io.KeyCode then
  56. t.Function(t.Name,io.UserInputState,io)
  57. end
  58. end
  59. end
  60. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  61. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  62. end
  63. end)
  64. Event.Parent = NLS([==[
  65. local Player = game:GetService("Players").LocalPlayer
  66. local Event = script:WaitForChild("UserInput_Event")
  67. local Mouse = Player:GetMouse()
  68. local UIS = game:GetService("UserInputService")
  69. local input = function(io,a)
  70. if a then return end
  71. --Since InputObject is a client-side instance, we create and pass table instead
  72. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  73. end
  74. UIS.InputBegan:Connect(input)
  75. UIS.InputEnded:Connect(input)
  76. local h,t
  77. --Give the server mouse data 30 times every second, but only if the values changed
  78. --If player is not moving their mouse, client won't fire events
  79. while wait(1/30) do
  80. if h~=Mouse.Hit or t~=Mouse.Target then
  81. h,t=Mouse.Hit,Mouse.Target
  82. Event:FireServer({isMouse=true,Target=t,Hit=h})
  83. end
  84. end]==],Player.Character)
  85.  
  86. ----Sandboxed game object that allows the usage of client-side methods and services
  87. --Real game object
  88. local _rg = game
  89.  
  90. --Metatable for fake service
  91. local fsmt = {
  92. __index = function(self,k)
  93. local s = rawget(self,"_RealService")
  94. if s then
  95. return typeof(s[k])=="function"
  96. and function(_,...)return s[k](s,...)end or s[k]
  97. end
  98. end,
  99. __newindex = function(self,k,v)
  100. local s = rawget(self,"_RealService")
  101. if s then s[k]=v end
  102. end
  103. }
  104. local function FakeService(t,RealService)
  105. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  106. return setmetatable(t,fsmt)
  107. end
  108.  
  109. --Fake game object
  110. local g = {
  111. GetService = function(self,s)
  112. return rawget(self,s) or _rg:GetService(s)
  113. end,
  114. Players = FakeService({
  115. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  116. },"Players"),
  117. UserInputService = FakeService(UIS,"UserInputService"),
  118. ContextActionService = FakeService(CAS,"ContextActionService"),
  119. RunService = FakeService({
  120. _btrs = {},
  121. RenderStepped = _rg:GetService("RunService").Heartbeat,
  122. BindToRenderStep = function(self,name,_,fun)
  123. self._btrs[name] = self.Heartbeat:Connect(fun)
  124. end,
  125. UnbindFromRenderStep = function(self,name)
  126. self._btrs[name]:Disconnect()
  127. end,
  128. },"RunService")
  129. }
  130. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  131. g.service = g.GetService
  132. FakeService(g,game)
  133. --Changing owner to fake player object to support owner:GetMouse()
  134. game,owner = g,g.Players.LocalPlayer
  135. end
  136. char = owner.Character
  137. NLS([[
  138. repeat wait()
  139. until game.Players.LocalPlayer and game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:waitForChild("SteveVR") and game.Players.LocalPlayer.Character:waitForChild("SteveVR")
  140. local mouse = game.Players.LocalPlayer:GetMouse()
  141. repeat wait() until mouse
  142. local plr = game.Players.LocalPlayer
  143. local torso = plr.Character.Torso
  144. local flying = true
  145. local deb = true
  146. local ctrl = {f = 0, b = 0, l = 0, r = 0}
  147. local lastctrl = {f = 0, b = 0, l = 0, r = 0}
  148. local maxspeed = 200
  149. local speed = 0
  150.  
  151. function Fly()
  152. local bg = Instance.new("BodyGyro", torso)
  153. bg.P = 9e4
  154. bg.maxTorque = Vector3.new(9e9, 9e9, 9e9)
  155. bg.cframe = torso.CFrame
  156. local bv = Instance.new("BodyVelocity", torso)
  157. bv.velocity = Vector3.new(0,0.1,0)
  158. bv.maxForce = Vector3.new(9e9, 9e9, 9e9)
  159. repeat wait()
  160. plr.Character:waitForChild("SteveVR").PlatformStand = true
  161. if ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0 then
  162. speed = speed+.5+(speed/maxspeed)
  163. if speed > maxspeed then
  164. speed = maxspeed
  165. end
  166. elseif not (ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0) and speed ~= 0 then
  167. speed = speed-1
  168. if speed < 0 then
  169. speed = 0
  170. end
  171. end
  172. if (ctrl.l + ctrl.r) ~= 0 or (ctrl.f + ctrl.b) ~= 0 then
  173. bv.velocity = ((game.Workspace.CurrentCamera.CoordinateFrame.lookVector * (ctrl.f+ctrl.b)) + ((game.Workspace.CurrentCamera.CoordinateFrame * CFrame.new(ctrl.l+ctrl.r,(ctrl.f+ctrl.b)*.2,0).p) - game.Workspace.CurrentCamera.CoordinateFrame.p))*speed
  174. lastctrl = {f = ctrl.f, b = ctrl.b, l = ctrl.l, r = ctrl.r}
  175. elseif (ctrl.l + ctrl.r) == 0 and (ctrl.f + ctrl.b) == 0 and speed ~= 0 then
  176. bv.velocity = ((game.Workspace.CurrentCamera.CoordinateFrame.lookVector * (lastctrl.f+lastctrl.b)) + ((game.Workspace.CurrentCamera.CoordinateFrame * CFrame.new(lastctrl.l+lastctrl.r,(lastctrl.f+lastctrl.b)*.2,0).p) - game.Workspace.CurrentCamera.CoordinateFrame.p))*speed
  177. else
  178. bv.velocity = Vector3.new(0,0.1,0)
  179. end
  180. bg.cframe = game.Workspace.CurrentCamera.CoordinateFrame * CFrame.Angles(-math.rad((ctrl.f+ctrl.b)*0*speed/maxspeed),0,0)
  181. until not flying
  182. ctrl = {f = 0, b = 0, l = 0, r = 0}
  183. lastctrl = {f = 0, b = 0, l = 0, r = 0}
  184. speed = 0
  185. bg:Destroy()
  186. bv:Destroy()
  187. plr.Character:waitForChild("SteveVR").PlatformStand = false
  188. end
  189. mouse.KeyDown:connect(function(key)
  190. if key:lower() == "e" then
  191. if flying then flying = false
  192. else
  193. flying = true
  194. Fly()
  195. end
  196. elseif key:lower() == "w" then
  197. ctrl.f = 1
  198. elseif key:lower() == "s" then
  199. ctrl.b = -1
  200. elseif key:lower() == "a" then
  201. ctrl.l = -1
  202. elseif key:lower() == "d" then
  203. ctrl.r = 1
  204. end
  205. end)
  206. mouse.KeyUp:connect(function(key)
  207. if key:lower() == "w" then
  208. ctrl.f = 0
  209. elseif key:lower() == "s" then
  210. ctrl.b = 0
  211. elseif key:lower() == "a" then
  212. ctrl.l = 0
  213. elseif key:lower() == "d" then
  214. ctrl.r = 0
  215. end
  216. end)
  217. Fly()
  218. ]],char)
  219. -- NOTE (READ!!): This script doesn't work on voidacity's script builder
  220. -- since it crashes your game, but it's usable on other
  221. -- script builders like fancy dev's or nexure's.
  222. -- (it just doesn't work on voidacity only)
  223.  
  224. --[[
  225.  
  226.  
  227.  
  228. ▓▒▒▓▓ ░▓▒▒██▒▒▓█▒▒▓▓ █▒▒▓█▒▒▒▒▒▒▒█▓▒▒▒▒▒▒▒█▒▓▒▒▒▒▒▓█▒▒▒▒▒▒▒█▓▒▒▒▓▒▒▓█▒▒▒▒▒▓▒▓░
  229. ▓ ░█▒ ▓░ ▓▓ ░█ ░█░▒ ▒▒ █░ █ ░ ▒▓ ▓▒ █ ░░
  230. ░░ ░ ▒██░░░ █░ ▓▓ ░░█░ ▓▒ ▒█████░ ▓█████░░ ▓▓ ░█ ▒█░█▓ ▒▓ ░███████▓ ██░
  231. ▓ ▓█▓ ▒▒█ █▒ ░█ ▓▒ ▒█████░ ▓█████░░ ▓▓ ░█ ▒█▓░ ░▓ ▓███████ █▓
  232. ▓ ░░ ▒█ █▒ ░ █░ ░░░░█░ ▓█████░ ▒██░ ▒██▒ ░█ ░ ░███ ▒░
  233. ▒░ ░░ ▓▓ █░ ▓▒ █░ ░░ ░█░ ▓█████░ █░ ░░ ░ █░ ░ ███░ ░▒
  234. ▒░ ▓▓ ▒▓ █░ ▒█ █▒ ░ █ ▓█████░ ▓ █░ ▒▓ █▒ ░ █▒ ▒█▓█████▓ ░▒
  235. ▒░▒░█▒▒█▓ █░ ▓█ ██░ ░ █░ ▓█████░ ▓█████░ ▒█ ░ █▒ ▒█ ░ █▒ ░███▓███▓░ ▒
  236. ░▒░ ▒█▓ ▒▒ ▒█░ ▓▓ ░██ ░▓ ▒ ░ █░ █░ ▒█ ▓▒ ░█ ▒▓ ███ ▓███░ ▒░
  237. ▒░ ░▓██▒░░ ▓▓ █▒ ▒██ ▓▓ ░ ░ ░█░ ░ █░ ▒█ ▓▓ █░ ▒█ █▓░ ░███▒ ░▒
  238. ▒▒ ▒███░▒ ░█ █▓ ░██░ ▒█ ░ █░ ░ █░ ▒█ █▒ ░█ ▓▓ ░█ ░██▓▒ ▓░
  239. ▒▒ ▒██▓▓▒ ▒▓ █░ ▓█▓ █░ ▒█░ █░ ▓▓ ░█░ ▓▒ ░█▒ ▓ ▓█▒░ ▒▒
  240. ▒▒░ █▓ ▓▒░▒█▒░░▓█░░▒█▒▒░░▓▓░▒▒▒░░▒█▒░░░░░░░█▒░▒█▓░░▓█▒░▒█░░░█▓░░▓▒ ▓█░░▒▒
  241. ░▒▒▒░ ▒░░▒▒░░░░░░░░ ▒░░░▒▒▒▒▒▒▒▒░░░░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒░▒▒▒░░░░ ░░░▒░
  242. ASCII Art Generators are cool :)
  243.  
  244.  
  245.  
  246. ]]
  247.  
  248. -- Scroll down for changelog...
  249.  
  250. -- ORIGINAL CREATOR: Depr1
  251.  
  252. -- If this script isn't on pastebin or the user who uploaded this isn't called "Delros12"
  253. -- (and yes my pastebin account is Delros12) or the link is not https://pastebin.com/2NNDTLjL
  254. -- then this is not the original link of this script.
  255.  
  256. -- The original link of the script gets edited constantly for updates, if you use the original
  257. -- link you will be able to enjoy the most recent updates of this script without changing to
  258. -- another link which contains updated script.
  259.  
  260. -- Controls: Q to sneak, use the keypad numbers 1-9 to change blocks,
  261. -- choose a empty slot if you want to remove a block, E to open creative
  262. -- inventory, right-click to destroy a block in your toolbar in creative
  263. -- inventory, R to make camera face your character's front or back.
  264.  
  265. -- You will become steve when you use this script, if you die after
  266. -- using this script, keep trying to use it or wait 60 seconds
  267. -- (it doesn't work at first but eventually it will)
  268.  
  269. -- Enjoy! :)
  270.  
  271. local updateHand = false
  272.  
  273. local RS = game:GetService("RunService").RenderStepped
  274. local targetName = owner.Name
  275. local player = game.Players:FindFirstChild(targetName)
  276. local creativeInventory = {
  277. {
  278. name = "Dirt",
  279. size = Vector3.new(2.6, 2.6, 2.6),
  280. transparency = 0;
  281. frontTex = "rbxassetid://152569532",
  282. backTex = "rbxassetid://152569532",
  283. topTex = "rbxassetid://152569532",
  284. bottomTex = "rbxassetid://152569532",
  285. leftTex = "rbxassetid://152569532",
  286. rightTex = "rbxassetid://152569532",
  287. displayTex = "",
  288. sound = "rbxassetid://1102186681",
  289. soundVol = 1.25,
  290. hasGravity = false,
  291. objectType = "Block"
  292. },
  293. {
  294. name = "Grass",
  295. size = Vector3.new(2.6, 2.6, 2.6),
  296. transparency = 0;
  297. frontTex = "rbxassetid://96430337",
  298. backTex = "rbxassetid://96430337",
  299. topTex = "rbxassetid://96430265",
  300. bottomTex = "rbxassetid://179655033",
  301. leftTex = "rbxassetid://96430337",
  302. rightTex = "rbxassetid://96430337",
  303. displayTex = "",
  304. sound = "rbxassetid://1102186681",
  305. soundVol = 1.25,
  306. hasGravity = false,
  307. objectType = "Block"
  308. },
  309. {
  310. name = "Sand",
  311. size = Vector3.new(2.6, 2.6, 2.6),
  312. transparency = 0;
  313. frontTex = "rbxassetid://347007448",
  314. backTex = "rbxassetid://347007448",
  315. topTex = "rbxassetid://347007448",
  316. bottomTex = "rbxassetid://347007448",
  317. leftTex = "rbxassetid://347007448",
  318. rightTex = "rbxassetid://347007448",
  319. displayTex = "",
  320. sound = "rbxassetid://1102186681",
  321. soundVol = 1.25,
  322. hasGravity = true,
  323. objectType = "Block"
  324. },
  325. {
  326. name = "Gravel",
  327. size = Vector3.new(2.6, 2.6, 2.6),
  328. transparency = 0;
  329. frontTex = "rbxassetid://151701568",
  330. backTex = "rbxassetid://151701568",
  331. topTex = "rbxassetid://151701568",
  332. bottomTex = "rbxassetid://151701568",
  333. leftTex = "rbxassetid://151701568",
  334. rightTex = "rbxassetid://151701568",
  335. displayTex = "",
  336. sound = "rbxassetid://1102186681",
  337. soundVol = 1.25,
  338. hasGravity = true,
  339. objectType = "Block"
  340. },
  341. {
  342. name = "Stone",
  343. size = Vector3.new(2.6, 2.6, 2.6),
  344. transparency = 0;
  345. frontTex = "rbxassetid://75880927",
  346. backTex = "rbxassetid://75880927",
  347. topTex = "rbxassetid://75880927",
  348. bottomTex = "rbxassetid://75880927",
  349. leftTex = "rbxassetid://75880927",
  350. rightTex = "rbxassetid://75880927",
  351. displayTex = "",
  352. sound = "rbxassetid://1016978163",
  353. soundVol = 2,
  354. hasGravity = false,
  355. objectType = "Block"
  356. },
  357. {
  358. name = "Diamond Ore",
  359. size = Vector3.new(2.6, 2.6, 2.6),
  360. transparency = 0;
  361. frontTex = "rbxassetid://152572119",
  362. backTex = "rbxassetid://152572119",
  363. topTex = "rbxassetid://152572119",
  364. bottomTex = "rbxassetid://152572119",
  365. leftTex = "rbxassetid://152572119",
  366. rightTex = "rbxassetid://152572119",
  367. displayTex = "",
  368. sound = "rbxassetid://1016978163",
  369. soundVol = 2,
  370. hasGravity = false,
  371. objectType = "Block"
  372. },
  373. {
  374. name = "Diamond Block",
  375. size = Vector3.new(2.6, 2.6, 2.6),
  376. transparency = 0;
  377. frontTex = "rbxassetid://56749955",
  378. backTex = "rbxassetid://56749955",
  379. topTex = "rbxassetid://56749955",
  380. bottomTex = "rbxassetid://56749955",
  381. leftTex = "rbxassetid://56749955",
  382. rightTex = "rbxassetid://56749955",
  383. displayTex = "",
  384. sound = "rbxassetid://1016978163",
  385. soundVol = 2,
  386. hasGravity = false,
  387. objectType = "Block"
  388. },
  389. {
  390. name = "Emerald Block",
  391. size = Vector3.new(2.6, 2.6, 2.6),
  392. transparency = 0;
  393. frontTex = "rbxassetid://152410853",
  394. backTex = "rbxassetid://152410853",
  395. topTex = "rbxassetid://152410853",
  396. bottomTex = "rbxassetid://152410853",
  397. leftTex = "rbxassetid://152410853",
  398. rightTex = "rbxassetid://152410853",
  399. displayTex = "",
  400. sound = "rbxassetid://1016978163",
  401. soundVol = 2,
  402. hasGravity = false,
  403. objectType = "Block"
  404. },
  405. {
  406. name = "Emerald Ore",
  407. size = Vector3.new(2.6, 2.6, 2.6),
  408. transparency = 0;
  409. frontTex = "rbxassetid://152410868",
  410. backTex = "rbxassetid://152410868",
  411. topTex = "rbxassetid://152410868",
  412. bottomTex = "rbxassetid://152410868",
  413. leftTex = "rbxassetid://152410868",
  414. rightTex = "rbxassetid://152410868",
  415. displayTex = "",
  416. sound = "rbxassetid://1016978163",
  417. soundVol = 2,
  418. hasGravity = false,
  419. objectType = "Block"
  420. },
  421. {
  422. name = "Obsidian",
  423. size = Vector3.new(2.6, 2.6, 2.6),
  424. transparency = 0;
  425. frontTex = "rbxassetid://112560322",
  426. backTex = "rbxassetid://112560322",
  427. topTex = "rbxassetid://112560322",
  428. bottomTex = "rbxassetid://112560322",
  429. leftTex = "rbxassetid://112560322",
  430. rightTex = "rbxassetid://112560322",
  431. displayTex = "",
  432. sound = "rbxassetid://1016978163",
  433. soundVol = 2,
  434. hasGravity = false,
  435. objectType = "Block"
  436. },
  437. {
  438. name = "Gold Block",
  439. size = Vector3.new(2.6, 2.6, 2.6),
  440. transparency = 0;
  441. frontTex = "rbxassetid://152572128",
  442. backTex = "rbxassetid://152572128",
  443. topTex = "rbxassetid://152572128",
  444. bottomTex = "rbxassetid://152572128",
  445. leftTex = "rbxassetid://152572128",
  446. rightTex = "rbxassetid://152572128",
  447. displayTex = "",
  448. sound = "rbxassetid://1016978163",
  449. soundVol = 2,
  450. hasGravity = false,
  451. objectType = "Block"
  452. },
  453. {
  454. name = "Gold Ore",
  455. size = Vector3.new(2.6, 2.6, 2.6),
  456. transparency = 0;
  457. frontTex = "rbxassetid://152572121",
  458. backTex = "rbxassetid://152572121",
  459. topTex = "rbxassetid://152572121",
  460. bottomTex = "rbxassetid://152572121",
  461. leftTex = "rbxassetid://152572121",
  462. rightTex = "rbxassetid://152572121",
  463. displayTex = "",
  464. sound = "rbxassetid://1016978163",
  465. soundVol = 2,
  466. hasGravity = false,
  467. objectType = "Block"
  468. },
  469. {
  470. name = "Iron Block",
  471. size = Vector3.new(2.6, 2.6, 2.6),
  472. transparency = 0;
  473. frontTex = "rbxassetid://152572134",
  474. backTex = "rbxassetid://152572134",
  475. topTex = "rbxassetid://152572134",
  476. bottomTex = "rbxassetid://152572134",
  477. leftTex = "rbxassetid://152572134",
  478. rightTex = "rbxassetid://152572134",
  479. displayTex = "",
  480. sound = "rbxassetid://1016978163",
  481. soundVol = 2,
  482. hasGravity = false,
  483. objectType = "Block"
  484. },
  485. {
  486. name = "Iron Ore",
  487. size = Vector3.new(2.6, 2.6, 2.6),
  488. transparency = 0;
  489. frontTex = "rbxassetid://132879562",
  490. backTex = "rbxassetid://132879562",
  491. topTex = "rbxassetid://132879562",
  492. bottomTex = "rbxassetid://132879562",
  493. leftTex = "rbxassetid://132879562",
  494. rightTex = "rbxassetid://132879562",
  495. displayTex = "",
  496. sound = "rbxassetid://1016978163",
  497. soundVol = 2,
  498. hasGravity = false,
  499. objectType = "Block"
  500. },
  501. {
  502. name = "Redstone Block",
  503. size = Vector3.new(2.6, 2.6, 2.6),
  504. transparency = 0;
  505. frontTex = "rbxassetid://136260219",
  506. backTex = "rbxassetid://136260219",
  507. topTex = "rbxassetid://136260219",
  508. bottomTex = "rbxassetid://136260219",
  509. leftTex = "rbxassetid://136260219",
  510. rightTex = "rbxassetid://136260219",
  511. sound = "rbxassetid://1016978163",
  512. soundVol = 2,
  513. hasGravity = false,
  514. objectType = "Block"
  515. },
  516. {
  517. name = "Redstone Ore",
  518. size = Vector3.new(2.6, 2.6, 2.6),
  519. transparency = 0;
  520. frontTex = "rbxassetid://152572209",
  521. backTex = "rbxassetid://152572209",
  522. topTex = "rbxassetid://152572209",
  523. bottomTex = "rbxassetid://152572209",
  524. leftTex = "rbxassetid://152572209",
  525. rightTex = "rbxassetid://152572209",
  526. displayTex = "",
  527. sound = "rbxassetid://1016978163",
  528. soundVol = 2,
  529. hasGravity = false,
  530. objectType = "Block"
  531. },
  532. {
  533. name = "Coal Block",
  534. size = Vector3.new(2.6, 2.6, 2.6),
  535. transparency = 0;
  536. frontTex = "rbxassetid://152527418",
  537. backTex = "rbxassetid://152527418",
  538. topTex = "rbxassetid://152527418",
  539. bottomTex = "rbxassetid://152527418",
  540. leftTex = "rbxassetid://152527418",
  541. rightTex = "rbxassetid://152527418",
  542. displayTex = "",
  543. sound = "rbxassetid://1016978163",
  544. soundVol = 2,
  545. hasGravity = false,
  546. objectType = "Block"
  547. },
  548. {
  549. name = "Coal Ore",
  550. size = Vector3.new(2.6, 2.6, 2.6),
  551. transparency = 0;
  552. frontTex = "rbxassetid://152572101",
  553. backTex = "rbxassetid://152572101",
  554. topTex = "rbxassetid://152572101",
  555. bottomTex = "rbxassetid://152572101",
  556. leftTex = "rbxassetid://152572101",
  557. rightTex = "rbxassetid://152572101",
  558. displayTex = "",
  559. sound = "rbxassetid://1016978163",
  560. soundVol = 2,
  561. hasGravity = false,
  562. objectType = "Block"
  563. },
  564. {
  565. name = "Bedrock",
  566. size = Vector3.new(2.6, 2.6, 2.6),
  567. transparency = 0;
  568. frontTex = "rbxassetid://75881126",
  569. backTex = "rbxassetid://75881126",
  570. topTex = "rbxassetid://75881126",
  571. bottomTex = "rbxassetid://75881126",
  572. leftTex = "rbxassetid://75881126",
  573. rightTex = "rbxassetid://75881126",
  574. displayTex = "",
  575. sound = "rbxassetid://1016978163",
  576. soundVol = 2,
  577. hasGravity = false,
  578. objectType = "Block"
  579. },
  580. {
  581. name = "Cobblestone",
  582. size = Vector3.new(2.6, 2.6, 2.6),
  583. transparency = 0;
  584. frontTex = "rbxassetid://152572105",
  585. backTex = "rbxassetid://152572105",
  586. topTex = "rbxassetid://152572105",
  587. bottomTex = "rbxassetid://152572105",
  588. leftTex = "rbxassetid://152572105",
  589. rightTex = "rbxassetid://152572105",
  590. displayTex = "",
  591. sound = "rbxassetid://1016978163",
  592. soundVol = 2,
  593. hasGravity = false,
  594. objectType = "Block"
  595. },
  596. {
  597. name = "Mossy Stone Brick",
  598. size = Vector3.new(2.6, 2.6, 2.6),
  599. transparency = 0;
  600. frontTex = "rbxassetid://61826751",
  601. backTex = "rbxassetid://61826751",
  602. topTex = "rbxassetid://61826751",
  603. bottomTex = "rbxassetid://61826751",
  604. leftTex = "rbxassetid://61826751",
  605. rightTex = "rbxassetid://61826751",
  606. displayTex = "",
  607. sound = "rbxassetid://1016978163",
  608. soundVol = 2,
  609. hasGravity = false,
  610. objectType = "Block"
  611. },
  612. {
  613. name = "Cracked Stone Brick",
  614. size = Vector3.new(2.6, 2.6, 2.6),
  615. transparency = 0;
  616. frontTex = "rbxassetid://151802087",
  617. backTex = "rbxassetid://151802087",
  618. topTex = "rbxassetid://151802087",
  619. bottomTex = "rbxassetid://151802087",
  620. leftTex = "rbxassetid://151802087",
  621. rightTex = "rbxassetid://151802087",
  622. displayTex = "",
  623. sound = "rbxassetid://1016978163",
  624. soundVol = 2,
  625. hasGravity = false,
  626. objectType = "Block"
  627. },
  628. {
  629. name = "Chiseled Stone Brick",
  630. size = Vector3.new(2.6, 2.6, 2.6),
  631. transparency = 0;
  632. frontTex = "rbxassetid://151802074",
  633. backTex = "rbxassetid://151802074",
  634. topTex = "rbxassetid://151802074",
  635. bottomTex = "rbxassetid://151802074",
  636. leftTex = "rbxassetid://151802074",
  637. rightTex = "rbxassetid://151802074",
  638. displayTex = "",
  639. sound = "rbxassetid://1016978163",
  640. soundVol = 2,
  641. hasGravity = false,
  642. objectType = "Block"
  643. },
  644. {
  645. name = "Stone Brick",
  646. size = Vector3.new(2.6, 2.6, 2.6),
  647. transparency = 0;
  648. frontTex = "rbxassetid://61826773",
  649. backTex = "rbxassetid://61826773",
  650. topTex = "rbxassetid://61826773",
  651. bottomTex = "rbxassetid://61826773",
  652. leftTex = "rbxassetid://61826773",
  653. rightTex = "rbxassetid://61826773",
  654. displayTex = "",
  655. sound = "rbxassetid://1016978163",
  656. soundVol = 2,
  657. hasGravity = false,
  658. objectType = "Block"
  659. },
  660. {
  661. name = "Nether Brick",
  662. size = Vector3.new(2.6, 2.6, 2.6),
  663. transparency = 0;
  664. frontTex = "rbxassetid://151802104",
  665. backTex = "rbxassetid://151802104",
  666. topTex = "rbxassetid://151802104",
  667. bottomTex = "rbxassetid://151802104",
  668. leftTex = "rbxassetid://151802104",
  669. rightTex = "rbxassetid://151802104",
  670. displayTex = "",
  671. sound = "rbxassetid://1016978163",
  672. soundVol = 2,
  673. hasGravity = false,
  674. objectType = "Block"
  675. },
  676. {
  677. name = "Granite",
  678. size = Vector3.new(2.6, 2.6, 2.6),
  679. transparency = 0;
  680. frontTex = "rbxassetid://151776467",
  681. backTex = "rbxassetid://151776467",
  682. topTex = "rbxassetid://151776467",
  683. bottomTex = "rbxassetid://151776467",
  684. leftTex = "rbxassetid://151776467",
  685. rightTex = "rbxassetid://151776467",
  686. displayTex = "",
  687. sound = "rbxassetid://1016978163",
  688. soundVol = 2,
  689. hasGravity = false,
  690. objectType = "Block"
  691. },
  692. {
  693. name = "Diorite",
  694. size = Vector3.new(2.6, 2.6, 2.6),
  695. transparency = 0;
  696. frontTex = "rbxassetid://151776452",
  697. backTex = "rbxassetid://151776452",
  698. topTex = "rbxassetid://151776452",
  699. bottomTex = "rbxassetid://151776452",
  700. leftTex = "rbxassetid://151776452",
  701. rightTex = "rbxassetid://151776452",
  702. sound = "rbxassetid://1016978163",
  703. soundVol = 2,
  704. hasGravity = false,
  705. objectType = "Block"
  706. },
  707. {
  708. name = "Andesite",
  709. size = Vector3.new(2.6, 2.6, 2.6),
  710. transparency = 0;
  711. frontTex = "rbxassetid://151776422",
  712. backTex = "rbxassetid://151776422",
  713. topTex = "rbxassetid://151776422",
  714. bottomTex = "rbxassetid://151776422",
  715. leftTex = "rbxassetid://151776422",
  716. rightTex = "rbxassetid://151776422",
  717. displayTex = "",
  718. sound = "rbxassetid://1016978163",
  719. soundVol = 2,
  720. hasGravity = false,
  721. objectType = "Block"
  722. },
  723. {
  724. name = "Polished Granite",
  725. size = Vector3.new(2.6, 2.6, 2.6),
  726. transparency = 0;
  727. frontTex = "rbxassetid://151776506",
  728. backTex = "rbxassetid://151776506",
  729. topTex = "rbxassetid://151776506",
  730. bottomTex = "rbxassetid://151776506",
  731. leftTex = "rbxassetid://151776506",
  732. rightTex = "rbxassetid://151776506",
  733. displayTex = "",
  734. sound = "rbxassetid://1016978163",
  735. soundVol = 2,
  736. hasGravity = false,
  737. objectType = "Block"
  738. },
  739. {
  740. name = "Polished Diorite",
  741. size = Vector3.new(2.6, 2.6, 2.6),
  742. transparency = 0;
  743. frontTex = "rbxassetid://151776533",
  744. backTex = "rbxassetid://151776533",
  745. topTex = "rbxassetid://151776533",
  746. bottomTex = "rbxassetid://151776533",
  747. leftTex = "rbxassetid://151776533",
  748. rightTex = "rbxassetid://151776533",
  749. displayTex = "",
  750. sound = "rbxassetid://1016978163",
  751. soundVol = 2,
  752. hasGravity = false,
  753. objectType = "Block"
  754. },
  755. {
  756. name = "Polished Andesite",
  757. size = Vector3.new(2.6, 2.6, 2.6),
  758. transparency = 0;
  759. frontTex = "rbxassetid://151776506",
  760. backTex = "rbxassetid://151776506",
  761. topTex = "rbxassetid://151776506",
  762. bottomTex = "rbxassetid://151776506",
  763. leftTex = "rbxassetid://151776506",
  764. rightTex = "rbxassetid://151776506",
  765. displayTex = "",
  766. sound = "rbxassetid://1016978163",
  767. soundVol = 2,
  768. hasGravity = false,
  769. objectType = "Block"
  770. },
  771. {
  772. name = "Brick Block",
  773. size = Vector3.new(2.6, 2.6, 2.6),
  774. transparency = 0;
  775. frontTex = "rbxassetid://59389191",
  776. backTex = "rbxassetid://59389191",
  777. topTex = "rbxassetid://59389191",
  778. bottomTex = "rbxassetid://59389191",
  779. leftTex = "rbxassetid://59389191",
  780. rightTex = "rbxassetid://59389191",
  781. displayTex = "",
  782. sound = "rbxassetid://1016978163",
  783. soundVol = 2,
  784. hasGravity = false,
  785. objectType = "Block"
  786. },
  787. {
  788. name = "Packed Ice",
  789. size = Vector3.new(2.6, 2.6, 2.6),
  790. transparency = 0;
  791. frontTex = "rbxassetid://152528023",
  792. backTex = "rbxassetid://152528023",
  793. topTex = "rbxassetid://152528023",
  794. bottomTex = "rbxassetid://152528023",
  795. leftTex = "rbxassetid://152528023",
  796. rightTex = "rbxassetid://152528023",
  797. displayTex = "",
  798. sound = "rbxassetid://1016978163",
  799. soundVol = 2,
  800. hasGravity = false,
  801. objectType = "Block"
  802. },
  803. {
  804. name = "Ice Block",
  805. size = Vector3.new(2.6, 2.6, 2.6),
  806. transparency = 1;
  807. frontTex = "rbxassetid://118555586",
  808. backTex = "rbxassetid://118555586",
  809. topTex = "rbxassetid://118555586",
  810. bottomTex = "rbxassetid://118555586",
  811. leftTex = "rbxassetid://118555586",
  812. rightTex = "rbxassetid://118555586",
  813. displayTex = "",
  814. sound = "rbxassetid://1016978163",
  815. soundVol = 2,
  816. hasGravity = false,
  817. objectType = "Block"
  818. },
  819. {
  820. name = "Netherrack",
  821. size = Vector3.new(2.6, 2.6, 2.6),
  822. transparency = 0;
  823. frontTex = "rbxassetid://151802119",
  824. backTex = "rbxassetid://151802119",
  825. topTex = "rbxassetid://151802119",
  826. bottomTex = "rbxassetid://151802119",
  827. leftTex = "rbxassetid://151802119",
  828. rightTex = "rbxassetid://151802119",
  829. displayTex = "",
  830. sound = "rbxassetid://1016978163",
  831. soundVol = 2,
  832. hasGravity = false,
  833. objectType = "Block"
  834. },
  835. {
  836. name = "End Stone",
  837. size = Vector3.new(2.6, 2.6, 2.6),
  838. transparency = 0;
  839. frontTex = "rbxassetid://151802091",
  840. backTex = "rbxassetid://151802091",
  841. topTex = "rbxassetid://151802091",
  842. bottomTex = "rbxassetid://151802091",
  843. leftTex = "rbxassetid://151802091",
  844. rightTex = "rbxassetid://151802091",
  845. displayTex = "",
  846. sound = "rbxassetid://1016978163",
  847. soundVol = 2,
  848. hasGravity = false,
  849. objectType = "Block"
  850. },
  851. {
  852. name = "Glass Block",
  853. size = Vector3.new(2.6, 2.6, 2.6),
  854. transparency = 1;
  855. frontTex = "rbxassetid://152239003",
  856. backTex = "rbxassetid://152239003",
  857. topTex = "rbxassetid://152239003",
  858. bottomTex = "rbxassetid://152239003",
  859. leftTex = "rbxassetid://152239003",
  860. rightTex = "rbxassetid://152239003",
  861. displayTex = "",
  862. sound = "rbxassetid://1016978163",
  863. soundVol = 2,
  864. hasGravity = false,
  865. objectType = "Block"
  866. },
  867. {
  868. name = "Glowstone",
  869. size = Vector3.new(2.6, 2.6, 2.6),
  870. transparency = 0;
  871. frontTex = "rbxassetid://54790811",
  872. backTex = "rbxassetid://54790811",
  873. topTex = "rbxassetid://54790811",
  874. bottomTex = "rbxassetid://54790811",
  875. leftTex = "rbxassetid://54790811",
  876. rightTex = "rbxassetid://54790811",
  877. displayTex = "",
  878. sound = "rbxassetid://1016978163",
  879. soundVol = 2,
  880. hasGravity = false,
  881. objectType = "Block"
  882. },
  883. {
  884. name = "Bookshelf",
  885. size = Vector3.new(2.6, 2.6, 2.6),
  886. transparency = 0;
  887. frontTex = "rbxassetid://118554092",
  888. backTex = "rbxassetid://118554092",
  889. topTex = "rbxassetid://346201871",
  890. bottomTex = "rbxassetid://346201871",
  891. leftTex = "rbxassetid://118554092",
  892. rightTex = "rbxassetid://118554092",
  893. displayTex = "",
  894. sound = "rbxassetid://507863457",
  895. soundVol = 2,
  896. hasGravity = false,
  897. objectType = "Block"
  898. },
  899. {
  900. name = "Oak Wood Planks",
  901. size = Vector3.new(2.6, 2.6, 2.6),
  902. transparency = 0;
  903. frontTex = "rbxassetid://346201871",
  904. backTex = "rbxassetid://346201871",
  905. topTex = "rbxassetid://346201871",
  906. bottomTex = "rbxassetid://346201871",
  907. leftTex = "rbxassetid://346201871",
  908. rightTex = "rbxassetid://346201871",
  909. displayTex = "",
  910. sound = "rbxassetid://507863457",
  911. soundVol = 2,
  912. hasGravity = false,
  913. objectType = "Block"
  914. },
  915. {
  916. name = "Oak Log",
  917. size = Vector3.new(2.6, 2.6, 2.6),
  918. transparency = 0;
  919. frontTex = "rbxassetid://71445924",
  920. backTex = "rbxassetid://71445924",
  921. topTex = "rbxassetid://152538557",
  922. bottomTex = "rbxassetid://152538557",
  923. leftTex = "rbxassetid://71445924",
  924. rightTex = "rbxassetid://71445924",
  925. displayTex = "",
  926. sound = "rbxassetid://507863457",
  927. soundVol = 2,
  928. hasGravity = false,
  929. objectType = "Block"
  930. },
  931. {
  932. name = "Oak Leaves",
  933. size = Vector3.new(2.6, 2.6, 2.6),
  934. transparency = 1;
  935. frontTex = "rbxassetid://151708391",
  936. backTex = "rbxassetid://151708391",
  937. topTex = "rbxassetid://151708391",
  938. bottomTex = "rbxassetid://151708391",
  939. leftTex = "rbxassetid://151708391",
  940. rightTex = "rbxassetid://151708391",
  941. displayTex = "",
  942. sound = "rbxassetid://507863457",
  943. -- couldn't find a leaves sound for this one, sorry lol
  944. soundVol = 2,
  945. hasGravity = false,
  946. objectType = "Block"
  947. }
  948. }
  949. local toolBar = {
  950. {
  951. name = "Dirt Block",
  952. size = Vector3.new(2.6, 2.6, 2.6),
  953. transparency = 0;
  954. frontTex = "rbxassetid://152569532",
  955. backTex = "rbxassetid://152569532",
  956. topTex = "rbxassetid://152569532",
  957. bottomTex = "rbxassetid://152569532",
  958. leftTex = "rbxassetid://152569532",
  959. rightTex = "rbxassetid://152569532",
  960. displayTex = "",
  961. sound = "rbxassetid://1102186681",
  962. soundVol = 1.25,
  963. hasGravity = false,
  964. objectType = "Block"
  965. },
  966. {
  967. name = "Grass Block",
  968. size = Vector3.new(2.6, 2.6, 2.6),
  969. transparency = 0;
  970. frontTex = "rbxassetid://96430337",
  971. backTex = "rbxassetid://96430337",
  972. topTex = "rbxassetid://96430265",
  973. bottomTex = "rbxassetid://179655033",
  974. leftTex = "rbxassetid://96430337",
  975. rightTex = "rbxassetid://96430337",
  976. displayTex = "",
  977. sound = "rbxassetid://1102186681",
  978. soundVol = 1.25,
  979. hasGravity = false,
  980. objectType = "Block"
  981. },
  982. {
  983. name = "Stone",
  984. size = Vector3.new(2.6, 2.6, 2.6),
  985. transparency = 0;
  986. frontTex = "rbxassetid://75880927",
  987. backTex = "rbxassetid://75880927",
  988. topTex = "rbxassetid://75880927",
  989. bottomTex = "rbxassetid://75880927",
  990. leftTex = "rbxassetid://75880927",
  991. rightTex = "rbxassetid://75880927",
  992. displayTex = "",
  993. sound = "rbxassetid://1016978163",
  994. soundVol = 2,
  995. hasGravity = false,
  996. objectType = "Block"
  997. },
  998. {
  999. name = "Diamond Ore",
  1000. size = Vector3.new(2.6, 2.6, 2.6),
  1001. transparency = 0;
  1002. frontTex = "rbxassetid://57928490",
  1003. backTex = "rbxassetid://57928490",
  1004. topTex = "rbxassetid://57928490",
  1005. bottomTex = "rbxassetid://57928490",
  1006. leftTex = "rbxassetid://57928490",
  1007. rightTex = "rbxassetid://57928490",
  1008. displayTex = "",
  1009. sound = "rbxassetid://1016978163",
  1010. soundVol = 2,
  1011. hasGravity = false,
  1012. objectType = "Block"
  1013. },
  1014. {
  1015. name = "Diamond Block",
  1016. size = Vector3.new(2.6, 2.6, 2.6),
  1017. transparency = 0;
  1018. frontTex = "rbxassetid://56749955",
  1019. backTex = "rbxassetid://56749955",
  1020. topTex = "rbxassetid://56749955",
  1021. bottomTex = "rbxassetid://56749955",
  1022. leftTex = "rbxassetid://56749955",
  1023. rightTex = "rbxassetid://56749955",
  1024. displayTex = "",
  1025. sound = "rbxassetid://1016978163",
  1026. soundVol = 2,
  1027. hasGravity = false,
  1028. objectType = "Block"
  1029. },
  1030. {
  1031. name = "Oak Wood Planks",
  1032. size = Vector3.new(2.6, 2.6, 2.6),
  1033. transparency = 0;
  1034. frontTex = "rbxassetid://346201871",
  1035. backTex = "rbxassetid://346201871",
  1036. topTex = "rbxassetid://346201871",
  1037. bottomTex = "rbxassetid://346201871",
  1038. leftTex = "rbxassetid://346201871",
  1039. rightTex = "rbxassetid://346201871",
  1040. displayTex = "",
  1041. sound = "rbxassetid://507863457",
  1042. soundVol = 2,
  1043. hasGravity = false,
  1044. objectType = "Block"
  1045. },
  1046. {
  1047. name = "Oak Log",
  1048. size = Vector3.new(2.6, 2.6, 2.6),
  1049. transparency = 0;
  1050. frontTex = "rbxassetid://71445924",
  1051. backTex = "rbxassetid://71445924",
  1052. topTex = "rbxassetid://152538557",
  1053. bottomTex = "rbxassetid://152538557",
  1054. leftTex = "rbxassetid://71445924",
  1055. rightTex = "rbxassetid://71445924",
  1056. displayTex = "",
  1057. sound = "rbxassetid://507863457",
  1058. soundVol = 2,
  1059. hasGravity = false,
  1060. objectType = "Block"
  1061. }
  1062. --[[{
  1063. name = "Redstone",
  1064. size = Vector3.new(2.6, 0.05, 2.6),
  1065. transparency = 1;
  1066. frontTex = "rbxassetid://151911305",
  1067. backTex = "",
  1068. topTex = "rbxassetid://151911305",
  1069. bottomTex = "",
  1070. leftTex = "",
  1071. rightTex = "",
  1072. displayTex = "rbxassetid://64124418",
  1073. sound = "rbxassetid://1016978163",
  1074. soundVol = 2,
  1075. hasGravity = false,
  1076. objectType = "Redstone Dust"
  1077. },]]
  1078. }
  1079. function putTexture(part, frontF, backF, topF, bottomF, leftF, rightF, className)
  1080. local faces = {"Front", "Back", "Top", "Bottom", "Left", "Right"}
  1081. for i,f in pairs(faces) do
  1082. local decal = Instance.new(className, part)
  1083. if i == 1 then decal.Texture = frontF decal.Name = f end
  1084. if i == 2 then decal.Texture = backF or frontF decal.Name = f end
  1085. if i == 3 then decal.Texture = topF or frontF decal.Name = f end
  1086. if i == 4 then decal.Texture = bottomF or frontF decal.Name = f end
  1087. if i == 5 then decal.Texture = leftF or frontF decal.Name = f end
  1088. if i == 6 then decal.Texture = rightF or frontF decal.Name = f end
  1089. decal.Face = f
  1090. end
  1091. return part
  1092. end
  1093. function makeSquare(position, size, color, transparency, parent, zindex)
  1094. local label = Instance.new("TextLabel", parent)
  1095. label.Text = ""
  1096. label.BorderSizePixel = 0
  1097. label.BackgroundTransparency = transparency
  1098. label.Position = position
  1099. label.Size = size
  1100. label.BackgroundColor3 = color
  1101. if zindex == nil then label.ZIndex = 1 else label.ZIndex = zindex end
  1102. return label
  1103. end
  1104. function makeImage(position, size, image, parent, zindex)
  1105. local imglabel = Instance.new("ImageLabel", parent)
  1106. imglabel.BorderSizePixel = 0
  1107. imglabel.BackgroundTransparency = 1
  1108. imglabel.Position = position
  1109. imglabel.Size = size
  1110. imglabel.Image = image
  1111. if zindex == nil then imglabel.ZIndex = 1 else imglabel.ZIndex = zindex end
  1112. return imglabel
  1113. end
  1114. function putInventorySlot(position, image, parent, zindex)
  1115. local button = Instance.new("TextButton", parent)
  1116. button.Position = position
  1117. button.Size = UDim2.new(0, 36, 0, 36)
  1118. button.BackgroundColor3 = Color3.new(139/255, 139/255, 139/255)
  1119. button.Text = ""
  1120. button.BorderSizePixel = 0
  1121. button.ZIndex = zindex
  1122. local imageLabel = Instance.new("ImageLabel", button)
  1123. imageLabel.BackgroundTransparency = 0.9
  1124. imageLabel.Position = UDim2.new(0, 2, 0, 2)
  1125. imageLabel.Size = UDim2.new(0, 32, 0, 32)
  1126. imageLabel.Image = image
  1127. imageLabel.BorderSizePixel = 0
  1128. imageLabel.ZIndex = zindex
  1129. makeSquare(UDim2.new(0, 0, 0, 0), UDim2.new(0, 34, 0, 2),
  1130. Color3.new(55/255, 55/255, 55/255), 0, button, zindex)
  1131. makeSquare(UDim2.new(0, 0, 0, 0), UDim2.new(0, 2, 0, 34),
  1132. Color3.new(55/255, 55/255, 55/255), 0, button, zindex)
  1133. makeSquare(UDim2.new(0, 34, 0, 2), UDim2.new(0, 2, 0, 34),
  1134. Color3.new(255/255, 255/255, 255/255), 0, button, zindex)
  1135. makeSquare(UDim2.new(0, 2, 0, 34), UDim2.new(0, 34, 0, 2),
  1136. Color3.new(255/255, 255/255, 255/255), 0, button, zindex)
  1137. return button
  1138. end
  1139.  
  1140. function AngleDifference(Angle1, Angle2)
  1141. local Difference = {X = 0, Y = 0, Z = 0}
  1142. Difference.X = Angle2.X - Angle1.X
  1143.  
  1144. if (Difference.X > 180) then
  1145. Difference.X = Difference.X - 360
  1146. elseif (Difference.X < -180) then
  1147. Difference.X = Difference.X + 360
  1148. end
  1149.  
  1150. Difference.Y = Angle2.Y - Angle1.Y
  1151.  
  1152. if (Difference.Y > 180) then
  1153. Difference.Y = Difference.Y - 360
  1154. elseif (Difference.Y < -180) then
  1155. Difference.Y = Difference.Y + 360
  1156. end
  1157.  
  1158. Difference.Z = Angle2.Z - Angle1.Z
  1159.  
  1160. if (Difference.Z > 180) then
  1161. Difference.Z = Difference.Z - 360
  1162. elseif (Difference.Z < -180) then
  1163. Difference.Z = Difference.Z + 360
  1164. end
  1165.  
  1166. return Vector3.new(Difference.X, Difference.Y, Difference.Z)
  1167. end
  1168.  
  1169. local draggingBlock = nil
  1170. function makeInventory()
  1171. local playerGui = player:FindFirstChild("PlayerGui")
  1172. if playerGui then
  1173. local invGui = Instance.new("ScreenGui", playerGui)
  1174. local creativeInv = Instance.new("Frame", invGui)
  1175. creativeInv.BackgroundTransparency = 1
  1176. creativeInv.Position = UDim2.new(0.5, -170, 0.5, -202)
  1177.  
  1178. creativeInv.Visible = false
  1179.  
  1180. -- creative inventory GUI...
  1181.  
  1182. local blackOut = makeSquare(UDim2.new(0, 0, 0, 0), UDim2.new(1, 0, 1, 0),
  1183. Color3.new(0/255, 0/255, 0/255), 0.3, invGui, 1)
  1184. blackOut.Visible = false
  1185.  
  1186. creativeInv.Changed:connect(function()
  1187. blackOut.Visible = creativeInv.Visible
  1188. end)
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194. makeSquare(UDim2.new(0, -2, 0, 2), UDim2.new(0, 340, 0, 404),
  1195. Color3.new(198/255, 198/255, 198/255), 0, creativeInv, 3)
  1196. makeSquare(UDim2.new(0, 338, 0, 0), UDim2.new(0, 6, 0, 406),
  1197. Color3.new(85/255, 85/255, 85/255), 0, creativeInv, 2)
  1198. makeSquare(UDim2.new(0, 0, 0, 404), UDim2.new(0, 342, 0, 4),
  1199. Color3.new(85/255, 85/255, 85/255), 0, creativeInv, 3)
  1200. makeSquare(UDim2.new(0, 2, 0, 0), UDim2.new(0, 338, 0, 402),
  1201. Color3.new(198/255, 198/255, 198/255), 0, creativeInv, 3)
  1202. makeSquare(UDim2.new(0, -4, 0, -2), UDim2.new(0, 4, 0, 406),
  1203. Color3.new(255/255, 255/255, 255/255), 0, creativeInv, 3)
  1204. makeSquare(UDim2.new(0, -2, 0, -4), UDim2.new(0, 342, 0, 6),
  1205. Color3.new(255/255, 255/255, 255/255), 0, creativeInv, 2)
  1206. makeSquare(UDim2.new(0, 340, 0, -2), UDim2.new(0, 2, 0, 2),
  1207. Color3.new(198/255, 198/255, 198/255), 0, creativeInv, 2)
  1208. makeSquare(UDim2.new(0, 340, 0, -4), UDim2.new(0, 2, 0, 4),
  1209. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  1210. makeSquare(UDim2.new(0, 342, 0, -2), UDim2.new(0, 2, 0, 2),
  1211. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  1212. makeSquare(UDim2.new(0, 344, 0, 0), UDim2.new(0, 2, 0, 406),
  1213. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  1214. makeSquare(UDim2.new(0, -4, 0, -4), UDim2.new(0, 2, 0, 4),
  1215. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  1216. makeSquare(UDim2.new(0, -2, 0, -6), UDim2.new(0, 342, 0, 4),
  1217. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  1218. makeSquare(UDim2.new(0, 0, 0, 406), UDim2.new(0, 342, 0, 4),
  1219. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  1220. makeSquare(UDim2.new(0, 342, 0, 404), UDim2.new(0, 2, 0, 4),
  1221. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  1222. makeSquare(UDim2.new(0, -4, 0, 404), UDim2.new(0, 2, 0, 2),
  1223. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  1224. makeSquare(UDim2.new(0, -2, 0, 406), UDim2.new(0, 2, 0, 2),
  1225. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  1226. makeSquare(UDim2.new(0, -6, 0, -2), UDim2.new(0, 2, 0, 406),
  1227. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  1228. local text = makeSquare(UDim2.new(0, 4, 0, 8), UDim2.new(0, 0, 0, 0), Color3.new(0/255, 0/255, 0/255), 1, creativeInv, 3)
  1229. text.Text = "Creative Inventory"
  1230. text.Font = "SourceSansSemibold"
  1231. text.TextSize = 14
  1232. text.TextXAlignment = "Left"
  1233. --
  1234. local draggingBlockPicture = Instance.new("ImageLabel", invGui)
  1235. draggingBlockPicture.BackgroundTransparency = 1
  1236. draggingBlockPicture.Size = UDim2.new(0, 32, 0, 32)
  1237. draggingBlockPicture.ZIndex = 5
  1238. coroutine.resume(coroutine.create(function()
  1239. local invMouse = player:GetMouse()
  1240. --local RS = game:GetService("RunService").RenderStepped
  1241. invMouse.Button2Down:connect(function()
  1242. draggingBlock = nil
  1243. end)
  1244. while RS:wait() do
  1245. draggingBlockPicture.Position = UDim2.new(0, invMouse.X - 16, 0, invMouse.Y - 16)
  1246. if draggingBlock ~= nil then
  1247. draggingBlockPicture.Image = draggingBlock.frontTex
  1248. else
  1249. draggingBlockPicture.Image = ""
  1250. end
  1251. end
  1252. end))
  1253.  
  1254. local done = false
  1255. local x = 0
  1256. local y = 0
  1257.  
  1258. for i,b in pairs(creativeInventory) do
  1259. local display = ""
  1260. if b.displayTex == "" then
  1261. display = b.frontTex
  1262. else
  1263. if b.displayTex then
  1264. display = b.displayTex
  1265. end
  1266. end
  1267. putInventorySlot(UDim2.new(0.5, (x*36) + 8, 0.5, (y*36) + 28), display, creativeInv, 4).MouseButton1Down:connect(function()
  1268. if draggingBlock == nil then
  1269. draggingBlock = b
  1270. end
  1271. end)
  1272. x = x + 1
  1273. if x >= 8 then
  1274. x = 0
  1275. y = y + 1
  1276. end
  1277. end
  1278. if x == 0 then done = true end
  1279. while x < 8 and done == false do
  1280. putInventorySlot(UDim2.new(0.5, (x*36) + 8, 0.5, (y*36) + 28), "", creativeInv, 4)
  1281. x = x + 1
  1282. end
  1283. for i = 1, 9 do
  1284. if toolBar[i] ~= nil then
  1285. local invSlot = putInventorySlot(UDim2.new(0, 8 + ((i-1)*36), 0, 360), toolBar[i].frontTex, creativeInv, 4)
  1286. invSlot.MouseButton2Down:connect(function()
  1287. local imgLabel = invSlot:FindFirstChild("ImageLabel")
  1288. if imgLabel then
  1289. toolBar[i] = nil
  1290. imgLabel.Image = ""
  1291. end
  1292. end)
  1293. invSlot.MouseButton1Down:connect(function()
  1294. --updateHand = true
  1295. local imgLabel = invSlot:FindFirstChild("ImageLabel")
  1296. if toolBar[i] == nil then
  1297. toolBar[i] = draggingBlock
  1298. imgLabel.Image = draggingBlock.frontTex
  1299. draggingBlock = nil
  1300. return
  1301. end
  1302. if toolBar[i] ~= nil and draggingBlock == nil then
  1303. draggingBlock = toolBar[i]
  1304. toolBar[i] = nil
  1305. imgLabel.Image = ""
  1306. return
  1307. elseif toolBar[i] ~= nil and draggingBlock ~= nil then
  1308. --draggingBlock = toolBar[i]
  1309. --toolBar[i] = nil
  1310. imgLabel.Image = ""
  1311. local temp = toolBar[i]
  1312. toolBar[i] = draggingBlock
  1313. if imgLabel and draggingBlock ~= nil then
  1314. imgLabel.Image = draggingBlock.frontTex
  1315. end
  1316. if imgLabel and draggingBlock == nil then
  1317. imgLabel.Image = ""
  1318. end
  1319. draggingBlock = temp
  1320. return
  1321. end
  1322. end)
  1323. else
  1324. local invSlot = putInventorySlot(UDim2.new(0, 8 + ((i-1)*36), 0, 360), "", creativeInv, 4)
  1325. invSlot.MouseButton2Down:connect(function()
  1326. local imgLabel = invSlot:FindFirstChild("ImageLabel")
  1327. if imgLabel then
  1328. toolBar[i] = nil
  1329. imgLabel.Image = ""
  1330. end
  1331. end)
  1332. invSlot.MouseButton1Down:connect(function()
  1333. --updateHand = true
  1334. local imgLabel = invSlot:FindFirstChild("ImageLabel")
  1335. if toolBar[i] == nil then
  1336. toolBar[i] = draggingBlock
  1337. imgLabel.Image = draggingBlock.frontTex
  1338. draggingBlock = nil
  1339. return
  1340. end
  1341. if toolBar[i] ~= nil and draggingBlock == nil then
  1342. draggingBlock = toolBar[i]
  1343. toolBar[i] = nil
  1344. imgLabel.Image = ""
  1345. return
  1346. elseif toolBar[i] ~= nil and draggingBlock ~= nil then
  1347. --draggingBlock = toolBar[i]
  1348. --toolBar[i] = nil
  1349. imgLabel.Image = ""
  1350. local temp = toolBar[i]
  1351. toolBar[i] = draggingBlock
  1352. if imgLabel and draggingBlock ~= nil then
  1353. imgLabel.Image = draggingBlock.frontTex
  1354. end
  1355. if imgLabel and draggingBlock == nil then
  1356. imgLabel.Image = ""
  1357. end
  1358. draggingBlock = temp
  1359. return
  1360. end
  1361. end)
  1362. end
  1363. end
  1364. return creativeInv
  1365. end
  1366. end
  1367. function putToolBarSlot(position, image, zindex)
  1368. local playerGui = player:FindFirstChild("PlayerGui")
  1369. if playerGui then
  1370. local gui = playerGui:FindFirstChild("ToolBar") or Instance.new("ScreenGui", playerGui)
  1371. gui.Name = "ToolBar"
  1372. local slot = Instance.new("ImageLabel", gui)
  1373. slot.Position = position
  1374. slot.Size = UDim2.new(0, 32, 0, 32)
  1375. slot.BackgroundTransparency = 1
  1376. slot.ImageTransparency = 0
  1377. slot.Image = image
  1378. slot.ZIndex = 2
  1379.  
  1380. local imgSlot = makeImage(UDim2.new(0, 0, 0, 0), UDim2.new(0, 32, 0, 32),
  1381. "rbxassetid://347007448", slot)
  1382.  
  1383. imgSlot.ImageTransparency = 0.25
  1384. imgSlot.BackgroundTransparency = 1
  1385. imgSlot.ImageColor3 = Color3.new(0.225, 0.225, 0.225)
  1386.  
  1387. makeSquare(UDim2.new(0, 0, 0, 0), UDim2.new(0, 2, 0, 32),
  1388. Color3.new(0/255, 0/255, 0/255), 0.7, slot)
  1389. makeSquare(UDim2.new(0, 2, 0, 0), UDim2.new(0, 30, 0, 2),
  1390. Color3.new(0/255, 0/255, 0/255), 0.7, slot)
  1391. makeSquare(UDim2.new(0, -2, 0, -2), UDim2.new(0, 36, 0, 2),
  1392. Color3.new(106/255, 106/255, 106/255), 0, slot)
  1393. makeSquare(UDim2.new(0, -2, 0, -2), UDim2.new(0, 2, 0, 36),
  1394. Color3.new(106/255, 106/255, 106/255), 0, slot)
  1395. makeSquare(UDim2.new(0, 0, 0, 32), UDim2.new(0, 34, 0, 2),
  1396. Color3.new(130/255, 130/255, 130/255), 0, slot)
  1397. makeSquare(UDim2.new(0, 32, 0, 0), UDim2.new(0, 2, 0, 34),
  1398. Color3.new(130/255, 130/255, 130/255), 0, slot)
  1399. makeSquare(UDim2.new(0, -4, 0, -2), UDim2.new(0, 2, 0, 38),
  1400. Color3.new(130/255, 130/255, 130/255), 0, slot)
  1401. makeSquare(UDim2.new(0, 34, 0, -2), UDim2.new(0, 2, 0, 36),
  1402. Color3.new(106/255, 106/255, 106/255), 0, slot)
  1403. makeSquare(UDim2.new(0, -2, 0, 34), UDim2.new(0, 38, 0, 2),
  1404. Color3.new(106/255, 106/255, 106/255), 0, slot)
  1405. makeSquare(UDim2.new(0, -4, 0, -4), UDim2.new(0, 40, 0, 2),
  1406. Color3.new(156/255, 156/255, 156/255), 0, slot)
  1407. return slot
  1408. end
  1409. end
  1410. function divide(x, d)
  1411. if x ~= 0 and d ~= 0 then
  1412. return x/d
  1413. else
  1414. return x
  1415. end
  1416. end -- so it doesn't divide by zero
  1417. function getDistance(v1, v2)
  1418. return math.abs((Vector3.new(math.abs(v2.X - v1.X), math.abs(v2.Y - v1.Y), math.abs(v2.Z - v1.Z))).Magnitude)
  1419. end
  1420. function SnapToGrid(x, gridX)
  1421. local x = math.floor((x / gridX) + 0.5) * gridX
  1422. return x
  1423. end
  1424. function round(x)
  1425. if x%2 ~= 0.5 then
  1426. return math.floor(x+0.5)
  1427. end
  1428. return x-0.5
  1429. end
  1430. function weldTo(part1, part2)
  1431. local weld = Instance.new("Weld", part1)
  1432. weld.Part0 = part1
  1433. weld.Part1 = part2
  1434. return weld
  1435. end
  1436. function getMagnitudeXZ(velocity)
  1437. return math.sqrt(math.abs(velocity.X)^2 + math.abs(velocity.Z)^2)
  1438. end
  1439. function findHumanoid(inst)
  1440. local find = inst
  1441. local hum = nil
  1442. repeat
  1443. if find.Name == "Workspace" then return nil end
  1444. find = find.Parent
  1445. hum = find:FindFirstChild("Humanoid")
  1446. until hum
  1447. --if hum then print("found!!") else print("aw... not found") end
  1448. --if hum.ClassName ~= "Humanoid" then hum = nil end
  1449. return hum
  1450. end
  1451. function getSideByLocation(loc)
  1452. local side = nil
  1453. if loc.X < 0 then side = "Left" end
  1454. if loc.X > 0 then side = "Right" end
  1455. if loc.Y > 0 then side = "Top" end
  1456. if loc.Y < 0 then side = "Bottom" end
  1457. if loc.Z < 0 then side = "Front" end
  1458. if loc.Z > 0 then side = "Back" end
  1459.  
  1460. if (math.abs(loc.X) > 0 and math.abs(loc.Y) > 0) or
  1461. (math.abs(loc.X) > 0 and math.abs(loc.Z) > 0) or
  1462. (math.abs(loc.Y) > 0 and math.abs(loc.Z) > 0)
  1463. then
  1464. return nil
  1465. end
  1466. return side
  1467. end
  1468. function getSideByLocationRedstone(loc)
  1469. local side = nil
  1470. if loc.X < 0 then side = "Left" end
  1471. if loc.X > 0 then side = "Right" end
  1472. if loc.Y > 0 then side = "Top" end
  1473. if loc.Y < 0 then side = "Bottom" end
  1474. if loc.Z < 0 then side = "Front" end
  1475. if loc.Z > 0 then side = "Back" end
  1476.  
  1477. if (math.abs(loc.X) > 0 and math.abs(loc.Y) > 0) or
  1478. (math.abs(loc.X) > 0 and math.abs(loc.Z) > 0) or
  1479. (math.abs(loc.Y) > 0 and math.abs(loc.Z) > 0)
  1480. then
  1481. return nil
  1482. end
  1483. return side
  1484. end
  1485. function getBlockAtRegion(region)
  1486. local blockFound = nil
  1487. for _,part in pairs(game.Workspace:FindPartsInRegion3(region, nil, math.huge)) do
  1488. local usePart = true
  1489. if part.Name == "Debris" then usePart = false end
  1490. if usePart == true then
  1491. blockFound = part
  1492. break
  1493. end
  1494. end
  1495. return blockFound
  1496. end
  1497. function getRedstoneAtRegion(region)
  1498. local blockFound = nil
  1499. for _,part in pairs(game.Workspace:FindPartsInRegion3(region, nil, math.huge)) do
  1500. if isRedstone(part) then
  1501. blockFound = part
  1502. break
  1503. end
  1504. end
  1505. return blockFound
  1506. end
  1507. function isRedstone(block)
  1508. local objType = block:FindFirstChild("ObjectType")
  1509. if objType then
  1510. if objType.Value == "Redstone Dust" then
  1511. return true
  1512. else
  1513. return false
  1514. end
  1515. end
  1516. end
  1517. function updateRedstoneDust(dust, leftBlk, rightBlk, topBlk, bottomBlk, frontBlk, backBlk, recursion)
  1518. local objType = nil
  1519. if dust then
  1520. objType = dust:FindFirstChild("ObjectType")
  1521. end
  1522.  
  1523. local redstoneDust = "rbxassetid://151911305"
  1524. local redstoneLine = "rbxassetid://151907047"
  1525. local redstoneCorner = "rbxassetid://151907106"
  1526. local redstoneT = "rbxassetid://151907156"
  1527. local redstoneCross = "rbxassetid://151906997"
  1528.  
  1529. local Rotation = 0
  1530.  
  1531. local theresRedstoneAtLeft = false
  1532. local theresRedstoneAtRight = false
  1533. local theresRedstoneAtFront = false
  1534. local theresRedstoneAtBack = false
  1535.  
  1536. if leftBlk then theresRedstoneAtLeft = isRedstone(leftBlk) end
  1537. if rightBlk then theresRedstoneAtRight = isRedstone(rightBlk) end
  1538. if frontBlk then theresRedstoneAtFront = isRedstone(frontBlk) end
  1539. if backBlk then theresRedstoneAtBack = isRedstone(backBlk) end
  1540.  
  1541. if objType then
  1542. if objType.Value == "Redstone Dust" then
  1543. local topDecal = dust:FindFirstChild("Top")
  1544. if topDecal then
  1545. if theresRedstoneAtBack == false and theresRedstoneAtFront == false and
  1546. theresRedstoneAtLeft == false and theresRedstoneAtRight == false then
  1547. topDecal.Texture = redstoneDust
  1548. Rotation = 0
  1549. end
  1550.  
  1551. if theresRedstoneAtLeft == true or theresRedstoneAtRight == true then
  1552. topDecal.Texture = redstoneLine
  1553. Rotation = 0
  1554. end
  1555.  
  1556. if theresRedstoneAtFront == true or theresRedstoneAtBack == true then
  1557. topDecal.Texture = redstoneLine
  1558. Rotation = 90
  1559. end
  1560.  
  1561. if theresRedstoneAtLeft == true and theresRedstoneAtBack == true then
  1562. topDecal.Texture = redstoneCorner
  1563. Rotation = 0
  1564. end
  1565.  
  1566. if theresRedstoneAtBack == true and theresRedstoneAtRight == true then
  1567. topDecal.Texture = redstoneCorner
  1568. Rotation = 90
  1569. end
  1570.  
  1571. if theresRedstoneAtRight == true and theresRedstoneAtFront == true then
  1572. topDecal.Texture = redstoneCorner
  1573. Rotation = 180
  1574. end
  1575.  
  1576. if theresRedstoneAtFront == true and theresRedstoneAtLeft == true then
  1577. topDecal.Texture = redstoneCorner
  1578. Rotation = -90
  1579. end
  1580.  
  1581. if theresRedstoneAtBack == true and theresRedstoneAtLeft == true
  1582. and theresRedstoneAtFront == true then
  1583. topDecal.Texture = redstoneT
  1584. Rotation = -90
  1585. end
  1586.  
  1587. if theresRedstoneAtLeft == true and theresRedstoneAtFront == true
  1588. and theresRedstoneAtRight == true then
  1589. topDecal.Texture = redstoneT
  1590. Rotation = -180
  1591. end
  1592.  
  1593. if theresRedstoneAtFront == true and theresRedstoneAtRight == true
  1594. and theresRedstoneAtBack == true then
  1595. topDecal.Texture = redstoneT
  1596. Rotation = 90
  1597. end
  1598.  
  1599. if theresRedstoneAtRight == true and theresRedstoneAtBack == true
  1600. and theresRedstoneAtLeft == true then
  1601. topDecal.Texture = redstoneT
  1602. Rotation = 0
  1603. end
  1604.  
  1605. if theresRedstoneAtLeft == true and theresRedstoneAtRight == true and
  1606. theresRedstoneAtFront == true and theresRedstoneAtBack == true then
  1607. topDecal.Texture = redstoneCross
  1608. Rotation = 0
  1609. end
  1610. end
  1611. else
  1612. error("Not redstone dust.")
  1613. end
  1614. end
  1615.  
  1616. if recursion == true then
  1617. local function updateTex(blockTarget)
  1618. local leftSide = nil
  1619. local rightSide = nil
  1620. local frontSide = nil
  1621. local backSide = nil
  1622.  
  1623. local Point1 = blockTarget.CFrame.p - Vector3.new(2.6, 0.1, 2.6)
  1624. local Point2 = blockTarget.CFrame.p + Vector3.new(2.6, 0.1, 2.6)
  1625. local Region = Region3.new(Point1, Point2)
  1626. for _,part in pairs(game.Workspace:FindPartsInRegion3(
  1627. Region,
  1628. nil,
  1629. math.huge
  1630. )) do
  1631. local objType = part:FindFirstChild("ObjectType")
  1632. if isRedstone(part) then
  1633. local side = getSideByLocationRedstone(blockTarget.CFrame.p - part.CFrame.p)
  1634. if side == "Left" then
  1635. leftSide = part
  1636. elseif side == "Right" then
  1637. rightSide = part
  1638. elseif side == "Front" then
  1639. frontSide = part
  1640. elseif side == "Back" then
  1641. backSide = part
  1642. elseif side == "Left Top" then
  1643. leftSide = part
  1644. elseif side == "Right Top" then
  1645. rightSide = part
  1646. elseif side == "Front Top" then
  1647. frontSide = part
  1648. elseif side == "Back Top" then
  1649. backSide = part
  1650. elseif side == "Left Bottom" then
  1651. leftSide = part
  1652. elseif side == "Right Bottom" then
  1653. rightSide = part
  1654. elseif side == "Front Bottom" then
  1655. frontSide = part
  1656. elseif side == "Back Bottom" then
  1657. backSide = part
  1658. end
  1659. end
  1660. end
  1661.  
  1662. updateRedstoneDust(blockTarget, leftSide, rightSide, nil, nil, frontSide, backSide, false)
  1663. end
  1664. if leftBlk and theresRedstoneAtLeft then updateTex(leftBlk) end
  1665. if rightBlk and theresRedstoneAtRight then updateTex(rightBlk) end
  1666. if frontBlk and theresRedstoneAtFront then updateTex(frontBlk) end
  1667. if backBlk and theresRedstoneAtBack then updateTex(backBlk) end
  1668. end
  1669.  
  1670. if dust then dust.CFrame = CFrame.new(dust.CFrame.p.X, dust.CFrame.p.Y, dust.CFrame.p.Z) * CFrame.Angles(0, math.rad(Rotation), 0) end
  1671. end
  1672. if player then
  1673. local char = player.Character
  1674. if char then
  1675. char:FindFirstChildOfClass("Humanoid").DisplayDistanceType = "None"
  1676.  
  1677. if char then
  1678. local d = char:GetChildren()
  1679. for i=1, #d do
  1680. if (d[i].className == "Accessory") then
  1681. d[i]:remove()
  1682. end
  1683. if (d[i].className == "Hat") then
  1684. d[i]:remove()
  1685. end
  1686. end
  1687. end
  1688. damage = 10
  1689. local diedtofalldamage = false
  1690. local damageHeight = 10.4 -- The height at which the player will start getting damaged at
  1691. local lethalHeight = 59.8 -- The height at which the player will get killed
  1692.  
  1693. local root = char:WaitForChild("HumanoidRootPart")
  1694. local humanoid = char:WaitForChild("Humanoid")
  1695. humanoid.Name = "SteveVR"
  1696. humanoid.MaxHealth = math.huge
  1697. humanoid.Health = 9e9
  1698. Gravity = -2
  1699. humanoid.JumpPower = 25.11
  1700. BodyForce = Instance.new("BodyForce")
  1701. BodyForce.force = Vector3.new(0, (1-Gravity) * root:GetMass() * 236 / 1.2, 0)
  1702. BodyForce:clone().Parent = root
  1703.  
  1704. if humanoid and root then
  1705.  
  1706. local headHeight
  1707. humanoid.FreeFalling:Connect(function (state)
  1708. if state then
  1709. headHeight = root.Position.Y
  1710. elseif not state and headHeight ~= nil then
  1711. pcall(function ()
  1712.  
  1713. local fell = headHeight - root.Position.Y
  1714.  
  1715. if fell >= lethalHeight then
  1716. humanoid.Health = 0
  1717. diedtofalldamage = true
  1718. wait()
  1719. for i,v in pairs(game.Players:GetChildren()) do
  1720. if v.PlayerGui:FindFirstChild("TextLabel").Text == player.Name.. "Died" then
  1721. --v:FindFirstChild("TextLabel").Text = player.Name.. "fell from a high place"
  1722. end
  1723. end
  1724. elseif fell >= damageHeight then
  1725. humanoid.Health = humanoid.Health - math.floor(fell)
  1726. end
  1727. end)
  1728. end
  1729. end)
  1730. end
  1731. for _,cM in pairs(char:GetChildren()) do
  1732. if cM.ClassName == "CharacterMesh" then cM:Destroy() end
  1733. end
  1734.  
  1735. --[]
  1736. local gui = player.PlayerGui:FindFirstChild("ToolBar") or Instance.new("ScreenGui", player.PlayerGui)
  1737. gui.Name = "ToolBar"
  1738.  
  1739. makeSquare(UDim2.new(0.5, -166, 1, -111), UDim2.new(0, 364, 0, 2),
  1740. Color3.new(0/255, 0/255, 0/255), 0, gui)
  1741. makeSquare(UDim2.new(0.5, -166, 1, -111 + 42), UDim2.new(0, 364, 0, 2),
  1742. Color3.new(0/255, 0/255, 0/255), 0, gui)
  1743. makeSquare(UDim2.new(0.5, -166, 1, -111), UDim2.new(0, 2, 0, 44),
  1744. Color3.new(0/255, 0/255, 0/255), 0, gui)
  1745. makeSquare(UDim2.new(0.5, -166 + 362, 1, -111), UDim2.new(0, 2, 0, 44),
  1746. Color3.new(0/255, 0/255, 0/255), 0, gui)
  1747.  
  1748. for i = 1, 9 do
  1749. if toolBar[i] ~= nil then
  1750. local img = putToolBarSlot(UDim2.new(0.5, -160 + ((i-1)*40), 1, -105), toolBar[i].frontTex)
  1751. coroutine.resume(coroutine.create(function()
  1752. while wait() do
  1753. if toolBar[i] ~= nil then
  1754. if toolBar[i].displayTex == "" then
  1755. img.Image = toolBar[i].frontTex
  1756. else
  1757. img.Image = toolBar[i].displayTex
  1758. end
  1759. else
  1760. img.Image = ""
  1761. end
  1762. end
  1763. end))
  1764. else
  1765. local img = putToolBarSlot(UDim2.new(0.5, -160 + ((i-1)*40), 1, -105), "")
  1766. coroutine.resume(coroutine.create(function()
  1767. while wait() do
  1768. if toolBar[i] ~= nil then
  1769. if toolBar[i].displayTex == "" then
  1770. img.Image = toolBar[i].frontTex
  1771. else
  1772. img.Image = toolBar[i].displayTex
  1773. end
  1774. else
  1775. img.Image = ""
  1776. end
  1777. end
  1778. end))
  1779. end
  1780. end
  1781.  
  1782. local creativeInventoryGUI = makeInventory()
  1783.  
  1784. local humRootPart = char:WaitForChild("HumanoidRootPart")
  1785. local head = char:WaitForChild("Head")
  1786. head.Touched:Connect(function(p)
  1787. if p.Name ~= "Baseplate" then
  1788. p.Anchored = false
  1789. p:BreakJoints()
  1790. p.Velocity = Vector3.new(p.Velocity.X + (head.CFrame.lookVector.X * 200), p.Velocity.Y + (head.CFrame.lookVector.Y * 200) + 20, p.Velocity.Z + (head.CFrame.lookVector.Z * 20))
  1791. end
  1792. end)
  1793. local torso = char:WaitForChild("Torso")
  1794. torso.Size = Vector3.new(1.3 * 20, 1.95 * 20, 0.65 * 20)
  1795. local lArm = char:WaitForChild("Left Arm")
  1796. local rArm = char:WaitForChild("Right Arm")
  1797. local rArmPuller = Instance.new("Part",char)
  1798. local rArmPullerWeld = Instance.new("Weld",char)
  1799. local dragged = nil
  1800. rArmPuller.Transparency = 1
  1801. rArmPuller.Size = Vector3.new(1,12,1)
  1802. rArmPuller.Anchored = false
  1803. rArmPuller.CanCollide = false
  1804. rArmPullerWeld.Part0 = rArm
  1805. rArmPullerWeld.Part1 = rArmPuller
  1806. rArmPullerWeld.C0 = CFrame.new(0,-1.95 * 0.332 * 20 - 1,0)
  1807. rArmPuller.Touched:Connect(function(part)
  1808. if dragged ~= nil and part == dragged then
  1809. weldTo(rArmPuller,dragged)
  1810. rArm.Anchored = false
  1811. head.Anchored = false
  1812. end
  1813. end)
  1814. local lLeg = char:WaitForChild("Left Leg")
  1815. local rLeg = char:WaitForChild("Right Leg")
  1816. lLeg.Transparency = 1
  1817. rLeg.Transparency = 1
  1818. torso.Transparency = 1
  1819. blockmesharm = Instance.new("BlockMesh", lArm)
  1820. blockmesharm.Offset = Vector3.new(0,0.332 * 20,0)
  1821. blockmesharm2 = Instance.new("BlockMesh", rArm)
  1822. blockmesharm2.Offset = Vector3.new(0,0.332 * 20,0)
  1823. head.Size = Vector3.new(1.3, 1.3, 1.3) * 20
  1824. putTexture(head, "rbxassetid://38738031", "rbxassetid://36047330",
  1825. "rbxassetid://36047341", "rbxassetid://36047347",
  1826. "rbxassetid://36047323", "rbxassetid://36047315", "Decal")
  1827. lArm.Size = Vector3.new(0.65, 1.95, 0.65) * 20
  1828. putTexture(lArm, "rbxassetid://38934581", "rbxassetid://38934560",
  1829. "rbxassetid://38934613", "rbxassetid://38934568",
  1830. "rbxassetid://38934601", "rbxassetid://38934591", "Decal")
  1831.  
  1832. rArm.Size = Vector3.new(0.65, 1.95, 0.65) * 20
  1833. putTexture(rArm, "rbxassetid://38934560", "rbxassetid://38934581",
  1834. "rbxassetid://38934613", "rbxassetid://38934568",
  1835. "rbxassetid://38934601", "rbxassetid://38934591", "Decal")
  1836. head:WaitForChild("Mesh"):Destroy()
  1837. head:WaitForChild("face"):Destroy()
  1838. lS = Instance.new("Motor6D",torso)
  1839. lS.Name = "Left Shoulder"
  1840. lS.Part0 = lArm
  1841. lS.Part1 = torso
  1842. lS.C0 =CFrame.new(-0.325 * 20, 0.643 * 20, 0) * CFrame.Angles(-math.rad(90), 0, 0)
  1843. lS.C1 = CFrame.new(-0.65 * 40, 0.643 * 20, 0)
  1844. rS = Instance.new("Motor6D",torso)
  1845. rS.Name = "Right Shoulder"
  1846. rS.Part0 =rArm
  1847. rS.Part1 = torso
  1848. rS.C0 = CFrame.new(-0.325 * 20, 0.643 * 20, 0) * CFrame.Angles(-math.rad(90), 0, 0)
  1849. rS.C1 = CFrame.new(0.65 * 20, 0.643 * 20, 0)
  1850.  
  1851. -- now for the real stuff
  1852. -- |
  1853. -- |
  1854. -- V
  1855. local Mouse = player:GetMouse()
  1856. sound = Instance.new("Sound", head)
  1857. sound.SoundId = "rbxassetid://4843501652"
  1858. sound.Volume = 549867457586485
  1859. sound:Play()
  1860. sound.RollOffMode = Enum.RollOffMode.LinearSquare
  1861. sound.Looped = true
  1862. lS.C0 =CFrame.new(-0.325 * 20, 0.643 * 20, 0) * CFrame.Angles(-math.rad(90), 0, 0)
  1863. lS.C1 = CFrame.new(-0.65 * 40, 0.643 * 20, 0)
  1864. rS.C0 = CFrame.new(-0.325 * 20, 0.643 * 20, 0) * CFrame.Angles(-math.rad(90), 0, 0)
  1865. rS.C1 = CFrame.new(0.65 * 20, 0.643 * 20, 0)
  1866. RS:Connect(function()--math.rad(90)
  1867. if dragged ~= nil and not dragged:FindFirstChild("draggedpuller") then
  1868. draggedpuller = Instance.new("BodyPosition",dragged)
  1869. rArm.Anchored = true
  1870. head.Anchored = true
  1871. draggedpuller.Position = Vector3.new(rArmPuller.Position.X,rArmPuller.Position.Y,rArmPuller.Position.Z)
  1872. draggedpuller.Name = "draggedpuller"
  1873. rArm.Changed:Connect(function()
  1874. if draggedpuller then
  1875. draggedpuller.Position = Vector3.new(rArmPuller.Position.X,rArmPuller.Position.Y,rArmPuller.Position.Z)
  1876. end
  1877. end)
  1878. --draggedpuller.D = 9e9 * dragged:GetMass()
  1879. --draggedpuller.P = 9e9 * dragged:GetMass()
  1880. draggedpuller.MaxForce = Vector3.new(500000000, 500000000, 500000000)
  1881. elseif dragged == nil then
  1882. if draggedpuller then
  1883. --dragged.Velocity = Vector3.new(0,0,0)
  1884. draggedpuller.Parent = nil
  1885. end
  1886. end
  1887. if rArmPuller:FindFirstChildOfClass("Weld") and dragging == false then
  1888. rArmPuller:FindFirstChildOfClass("Weld"):Destroy()
  1889. end
  1890. rS.C0 = CFrame.new(-0.325 * 20, 0.643 * 20, 0) * CFrame.new(rArm.Position, Mouse.hit.p)
  1891. lS.C0 = CFrame.new(-0.325 * 20, 0.643 * 20, 0) * CFrame.new(lArm.Position, Mouse.hit.p)
  1892. end)
  1893. --local camPart = char:WaitForChild("camPart")
  1894.  
  1895. -- welding doesn't really work.
  1896. --local cameraHandWeld = Instance.new("Motor6D", camPart)
  1897. --cameraHandWeld.Part0 = camPart
  1898. --cameraHandWeld.Part1 = cameraHand
  1899. --cameraHandWeld.C0 = CFrame.new(5, 0, 0)
  1900. neck = torso:FindFirstChild("Neck")
  1901. neck.Part0 = head
  1902. neck.Part1 = torso
  1903. neck.C1 = CFrame.new(0, 0.975 * 20, 0)
  1904. neck.C0 = CFrame.new(0, -0.65 * 20, 0)
  1905. dragging = false
  1906. Mouse.Button1Down:Connect(function()
  1907. if Mouse.Target.Anchored == false and dragged == nil then
  1908. dragging = true
  1909. dragged = Mouse.Target
  1910. end
  1911. end)
  1912. Mouse.Button1Up:Connect(function()
  1913. if dragging == true and dragged ~= nil then
  1914. rArm.Anchored = false
  1915. head.Anchored = false
  1916. dragged.Velocity = rArm.Velocity
  1917. dragging = false
  1918. dragged = nil
  1919. end
  1920. end)
  1921. function snap(part)
  1922. coroutine.resume(coroutine.create(function()
  1923. part.Name = "Dust"
  1924. part.Anchored = true
  1925. part.CanCollide = true
  1926. local smoke = Instance.new("ParticleEmitter", part)
  1927. smoke.Size = NumberSequence.new({
  1928. NumberSequenceKeypoint.new(0, 0.6),
  1929. NumberSequenceKeypoint.new(1, 0.6)
  1930. })
  1931. coroutine.resume(coroutine.create(function()
  1932. while wait(0.1) do
  1933. part.Transparency = part.Transparency + 1
  1934. end
  1935. end))
  1936. smoke.Texture = "rbxassetid://1494734425"
  1937. smoke.Rate = 100
  1938. smoke.Lifetime = NumberRange.new(0.6, 1.2)
  1939. smoke.Speed = NumberRange.new(2, 5)
  1940. smoke.SpreadAngle = Vector2.new(-30, 30)
  1941.  
  1942. wait(0.07)
  1943.  
  1944. smoke.Enabled = false
  1945.  
  1946. wait(2)
  1947.  
  1948. part:Destroy()
  1949. end))
  1950. end
  1951. Mouse.KeyDown:Connect(function(key)
  1952. if key == "n" then
  1953. if Mouse.Target.Parent.ClassName == "Accessory" then
  1954. accessory = Mouse.Target.Parent
  1955. if accessory.Parent:FindFirstChildOfClass("Humanoid") and not accessory.Parent:FindFirstChildOfClass("Humanoid").Name == "SteveVR" then
  1956. local snapped = accessory.Parent
  1957. snapped:FindFirstChildOfClass("Humanoid").Health = 0
  1958. if snapped:FindFirstChildOfClass("Humanoid").RigType == Enum.HumanoidRigType.R15 then
  1959. snap(snapped.Head)
  1960. wait()
  1961. for i,v in pairs(snapped:GetChildren()) do
  1962. if v.ClassName == "Accessory" then
  1963. snap(v.Handle)
  1964. end
  1965. end
  1966. snap(snapped.RightUpperArm)
  1967. wait()
  1968. snap(snapped.UpperTorso)
  1969. wait()
  1970. snap(snapped.RightLowerArm)
  1971. wait()
  1972. snap(snapped.LeftUpperArm)
  1973. wait()
  1974. snap(snapped.LowerTorso)
  1975. wait()
  1976. snap(snapped.RightHand)
  1977. wait()
  1978. snap(snapped.LeftLowerArm)
  1979. wait()
  1980. snap(snapped.RightUpperLeg)
  1981. wait()
  1982. snap(snapped.LeftHand)
  1983. wait()
  1984. snap(snapped.RightLowerLeg)
  1985. wait()
  1986. snap(snapped.LeftUpperLeg)
  1987. wait()
  1988. snap(snapped.RightFoot)
  1989. wait()
  1990. snap(snapped.LeftLowerLeg)
  1991. wait()
  1992. snap(snapped.LeftFoot)
  1993. else
  1994. snap(snapped.Head)
  1995. wait()
  1996. for i,v in pairs(snapped:GetChildren()) do
  1997. if v.ClassName == "Accessory" then
  1998. snap(v.Handle)
  1999. end
  2000. end
  2001. snap(snapped["Right Arm"])
  2002. wait()
  2003. snap(snapped.Torso)
  2004. wait()
  2005. snap(snapped["Right Leg"])
  2006. wait()
  2007. snap(snapped["Left Arm"])
  2008. wait()
  2009. snap(snapped["Left Leg"])
  2010. end
  2011. end
  2012. end
  2013. if Mouse.Target.Parent:FindFirstChildOfClass("Humanoid") and accessory.Parent:FindFirstChildOfClass("Humanoid").Name ~= "SteveVR" then
  2014. local snapped = Mouse.Target.Parent
  2015. snapped:FindFirstChildOfClass("Humanoid").Health = 0
  2016. if snapped:FindFirstChildOfClass("Humanoid").RigType == Enum.HumanoidRigType.R15 then
  2017. snap(snapped.Head)
  2018. wait()
  2019. for i,v in pairs(snapped:GetChildren()) do
  2020. if v.ClassName == "Accessory" then
  2021. snap(v.Handle)
  2022. end
  2023. end
  2024. snap(snapped.RightUpperArm)
  2025. wait()
  2026. snap(snapped.UpperTorso)
  2027. wait()
  2028. snap(snapped.RightLowerArm)
  2029. wait()
  2030. snap(snapped.LeftUpperArm)
  2031. wait()
  2032. snap(snapped.LowerTorso)
  2033. wait()
  2034. snap(snapped.RightHand)
  2035. wait()
  2036. snap(snapped.LeftLowerArm)
  2037. wait()
  2038. snap(snapped.RightUpperLeg)
  2039. wait()
  2040. snap(snapped.LeftHand)
  2041. wait()
  2042. snap(snapped.RightLowerLeg)
  2043. wait()
  2044. snap(snapped.LeftUpperLeg)
  2045. wait()
  2046. snap(snapped.RightFoot)
  2047. wait()
  2048. snap(snapped.LeftLowerLeg)
  2049. wait()
  2050. snap(snapped.LeftFoot)
  2051. else
  2052. snap(snapped.Head)
  2053. wait()
  2054. for i,v in pairs(snapped:GetChildren()) do
  2055. if v.ClassName == "Accessory" then
  2056. snap(v.Handle)
  2057. end
  2058. end
  2059. snap(snapped["Right Arm"])
  2060. wait()
  2061. snap(snapped.Torso)
  2062. wait()
  2063. snap(snapped["Right Leg"])
  2064. wait()
  2065. snap(snapped["Left Arm"])
  2066. wait()
  2067. snap(snapped["Left Leg"])
  2068. end
  2069. end
  2070. end
  2071. end)
  2072. Mouse.KeyDown:Connect(function(key)
  2073. if key == "j" then
  2074. for i,v in pairs(game.Workspace:GetChildren()) do
  2075. if v:FindFirstChildOfClass("Humanoid") and v.Name ~= player.Name and v:FindFirstChildOfClass("Humanoid").Name ~= "SteveVR" then
  2076. coroutine.resume(coroutine.create(function()
  2077. local snapped = v
  2078. snapped:FindFirstChildOfClass("Humanoid").Health = 0
  2079. if snapped:FindFirstChildOfClass("Humanoid").RigType == Enum.HumanoidRigType.R15 then
  2080. snap(snapped.Head)
  2081. wait()
  2082. for i,v in pairs(snapped:GetChildren()) do
  2083. if v.ClassName == "Accessory" then
  2084. snap(v.Handle)
  2085. end
  2086. end
  2087. snap(snapped.RightUpperArm)
  2088. wait()
  2089. snap(snapped.UpperTorso)
  2090. wait()
  2091. snap(snapped.RightLowerArm)
  2092. wait()
  2093. snap(snapped.LeftUpperArm)
  2094. wait()
  2095. snap(snapped.LowerTorso)
  2096. wait()
  2097. snap(snapped.RightHand)
  2098. wait()
  2099. snap(snapped.LeftLowerArm)
  2100. wait()
  2101. snap(snapped.RightUpperLeg)
  2102. wait()
  2103. snap(snapped.LeftHand)
  2104. wait()
  2105. snap(snapped.RightLowerLeg)
  2106. wait()
  2107. snap(snapped.LeftUpperLeg)
  2108. wait()
  2109. snap(snapped.RightFoot)
  2110. wait()
  2111. snap(snapped.LeftLowerLeg)
  2112. wait()
  2113. snap(snapped.LeftFoot)
  2114. else
  2115. snap(snapped.Head)
  2116. wait()
  2117. for i,v in pairs(snapped:GetChildren()) do
  2118. if v.ClassName == "Accessory" then
  2119. snap(v.Handle)
  2120. end
  2121. end
  2122. snap(snapped["Right Arm"])
  2123. wait()
  2124. snap(snapped.Torso)
  2125. wait()
  2126. snap(snapped["Right Leg"])
  2127. wait()
  2128. snap(snapped["Left Arm"])
  2129. wait()
  2130. snap(snapped["Left Leg"])
  2131. end
  2132. end))
  2133. end
  2134. end
  2135. end
  2136. end)
  2137. --char.Torso.Anchored = true
  2138. end
  2139. end
Add Comment
Please, Sign In to add comment