ihaveamac Whisperer
Number of posts : 37 Age : 26 Mood : Registration date : 2009-05-12
Special Info Rewards: Great Advisor/Mentor Infractions: N/A
| Subject: HopperBin/Tool Scripts Tue May 12, 2009 11:36 am | |
| A reset code for a HopperBin. The bin hopps around. - Code:
-
function activated(mouse) mouse.Button1Down:connect(function() onButton1Down(mouse) end) end function onButton1Down(mouse) game.Players.LocalPlayer.Character.Humanoid.Health = 0 end Does that one work? | |
|
ihaveamac Whisperer
Number of posts : 37 Age : 26 Mood : Registration date : 2009-05-12
Special Info Rewards: Great Advisor/Mentor Infractions: N/A
| Subject: Material (HopperBin) Thu May 14, 2009 11:05 am | |
| A material code for a HopperBin. Can you believe bricks change material so fast? - Code:
-
local material = 0 local enabled = true function a(m) m.Button1Down:connect(function() d(m) end) m.KeyDown:connect(k) msg = Instance.new("Hint") msg.Parent = game.Players.LocalPlayer msg.Text = ("Press P (Plastic), Q (Wood), or X (Slate)") m.Icon = "rbxasset://textures/GunCursor.png" end function u() enabled = false material = 0 msg2 = game.Players.LocalPlayer:findFirstChild("Message") if msg2 ~= nil then msg2:remove() end end function d(m) if material ~= 0 then t = m.Target if not t.Locked then if material == 1 and enabled then t.Material = "Plastic" enabled = false end if material == 2 and enabled then t.Material = "Wood" enabled = false end if material == 3 and enabled then t.Material = "Slate" enabled = false end enabled = true end end end function k(e) if (e ~= nil) then if (e == "p") then material = 1 game.Players.LocalPlayer.Message.Text = "Material Selected: Plastic" end if (e == "q") then material = 2 game.Players.LocalPlayer.Message.Text = "Material Selected: Wood" end if (e == "x") then material = 3 game.Players.LocalPlayer.Message.Text = "Material Selected: Slate" end end end script.Parent.Selected:connect(a) script.Parent.Deselected:connect(u) Tested, it works.
Last edited by ihaveamac on Thu May 14, 2009 11:09 am; edited 1 time in total | |
|
Dark Guardian Community Fun Owner
Number of posts : 332 Age : 30 Location : Sydney Mood : Registration date : 2008-04-27
Special Info Rewards: Forum Creator, 1st most active user Infractions: N/A
| Subject: Re: HopperBin/Tool Scripts Thu May 14, 2009 11:09 am | |
| Yeah, it really works. Please give credit to ihaveamac or the owners of these codes on roblox, when using these codes please.
Last edited by Dark Guardian on Thu May 14, 2009 12:00 pm; edited 1 time in total | |
|
ihaveamac Whisperer
Number of posts : 37 Age : 26 Mood : Registration date : 2009-05-12
Special Info Rewards: Great Advisor/Mentor Infractions: N/A
| Subject: Rotate (HopperBin) Thu May 14, 2009 11:55 am | |
| Notice: toadjesse on ROBLOX made this script, I did not.Rotate, like a planet. - Code:
-
--------------------------------------------------------- rotation = 16 -- # clicks to make one full turn ---------------------------------------------------------
bin = script.Parent mode = "free"
function Message(text) local m = Instance.new("Message") m.Text = text m.Parent = game.Players.LocalPlayer wait(1) m:Remove() end
e = true function onButton1Down(mouse) if not e then return end e = false local target = mouse.Target if target ~= nil then if target.Locked == false then target.Anchored = true if mode == "x" then target.CFrame = target.CFrame * CFrame.fromAxisAngle(Vector3.new(1,0,0),math.pi/(rotation/0.5)) e = true elseif mode == "y" then target.CFrame = target.CFrame * CFrame.fromAxisAngle(Vector3.new(0,1,0),math.pi/(rotation/0.5)) e = true elseif mode == "z" then target.CFrame = target.CFrame * CFrame.fromAxisAngle(Vector3.new(0,0,1),math.pi/(rotation/0.5)) e = true elseif mode == "reset" then target.CFrame = CFrame.new(target.Position) e = true else while not e do local point = mouse.Hit.p target.CFrame = CFrame.new(target.Position,point) wait() end end end end end
function onButton1Up(mouse) e = true end
function onKeyDown(key) key = key:lower() if key == "x" or key == "y" or key == "z" then print(key) coroutine.resume(coroutine.create(Message),key:upper()) mode = key elseif key == "f" then print("free") coroutine.resume(coroutine.create(Message),"Free Rotate") mode = "free" elseif key == "r" then print("reset") coroutine.resume(coroutine.create(Message),"Reset") mode = "reset" end end
function onSelected(mouse) local c = game.Players.LocalPlayer:GetChildren() for i = 1,#c do if c[i].Name == "Message" then c[i]:Remove() end end
mouse.Icon = "rbxasset://textures\\GunCursor.png" mouse.Button1Down:connect(function() onButton1Down(mouse) end) mouse.Button1Up:connect(function() onButton1Up(mouse) end) mouse.KeyDown:connect(onKeyDown)
local h = Instance.new("Hint") h.Parent = game.Players.LocalPlayer h.Text = "Key: X,Y,Z: Rotate respective vector; F: Free Rotate; R: Reset CFrame; Click: Apply to brick" wait(3) h:Remove() end
bin.Selected:connect(onSelected) | |
|
Sponsored content
| Subject: Re: HopperBin/Tool Scripts | |
| |
|